PatchRequest
@objc(PPCPatchRequest)
@objcMembers
class PatchRequest
extension PatchRequest : CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, NSObjectProtocol
Represents each operation and their accepted path, as well as the paths accepted value for each type. Patch Order Documentation
Note
- To make an update, you may optionally provide a
reference_id. If you omit areference_id, PayPal defaults to areference_idofdefault.
-
Adds a
shippingAddressto the order request.Declaration
Swift
func add(shippingAddress: OrderAddress, referenceId: String? = nil)Parameters
shippingAddressThe address of the person to whom to ship the items.
referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
-
Adds a
shippingNameto the order request.Declaration
Swift
func add(shippingName: PurchaseUnit.ShippingName, referenceId: String? = nil)Parameters
shippingNameThe name of the person to whom to ship the items. Supports only the
full_nameproperty.referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
-
Adds
shippingOptionsto the order requestDeclaration
Swift
func add(shippingOptions: [ShippingMethod], referenceId: String? = nil)Parameters
shippingOptionsA list of shipping options for the order.
referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
-
Replaces the
amountof the order request.Declaration
Swift
func replace(amount: PurchaseUnit.Amount, referenceId: String? = nil)Parameters
amountThe total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
-
Replaces the
shippingAddressof the order request.Declaration
Swift
func replace(shippingAddress: OrderAddress, referenceId: String? = nil)Parameters
shippingAddressThe address of the person to whom to ship the items.
referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
-
Replaces the
shippingNameof the order request.Declaration
Swift
func replace(shippingName: PurchaseUnit.ShippingName, referenceId: String? = nil)Parameters
shippingNameThe name of the person to whom to ship the items. Supports only the
full_nameproperty.referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
-
Replaces the
shippingOptionsof the order request.Declaration
Swift
func replace(shippingOptions: [ShippingMethod], referenceId: String? = nil)Parameters
shippingOptionsA list of shipping options for the order.
referenceIdThe API caller-provided external ID for the purchase unit if more than one purchase unit was provided.
View on GitHub
Install in Dash
PatchRequest Class Reference