Class: PaypalServerSdk::VaultedDigitalWalletShippingDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::VaultedDigitalWalletShippingDetails
- Defined in:
- lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb
Overview
The shipping details.
Instance Attribute Summary collapse
-
#address ⇒ Address
The portable international postal address.
-
#name ⇒ ShippingName
The name of the party.
-
#type ⇒ FulfillmentType
A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(name: SKIP, type: SKIP, address: SKIP) ⇒ VaultedDigitalWalletShippingDetails
constructor
A new instance of VaultedDigitalWalletShippingDetails.
Methods inherited from BaseModel
Constructor Details
#initialize(name: SKIP, type: SKIP, address: SKIP) ⇒ VaultedDigitalWalletShippingDetails
Returns a new instance of VaultedDigitalWalletShippingDetails.
54 55 56 57 58 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 54 def initialize(name: SKIP, type: SKIP, address: SKIP) @name = name unless name == SKIP @type = type unless type == SKIP @address = address unless address == SKIP end |
Instance Attribute Details
#address ⇒ Address
The portable international postal address. Maps to [AddressValidationMetadata](github.com/googlei18n/libaddressinput/ wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](www.w3.org/TR/html51/sec-forms.html#autofilling-form-co ntrols-the-autocomplete-attribute).
29 30 31 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 29 def address @address end |
#name ⇒ ShippingName
The name of the party.
14 15 16 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 14 def name @name end |
#type ⇒ FulfillmentType
A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either ‘type` or `options` may be present, but not both.
20 21 22 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 20 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = ShippingName.from_hash(hash['name']) if hash['name'] type = hash.key?('type') ? hash['type'] : SKIP address = Address.from_hash(hash['address']) if hash['address'] # Create object from extracted values. VaultedDigitalWalletShippingDetails.new(name: name, type: type, address: address) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['type'] = 'type' @_hash['address'] = 'address' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 47 |
# File 'lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb', line 41 def self.optionals %w[ name type address ] end |