Class: PCPServerSDK::Models::ApplePayPayment
- Inherits:
-
Object
- Object
- PCPServerSDK::Models::ApplePayPayment
- Defined in:
- lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb
Constant Summary collapse
- JSON_PROPERTY_TOKEN =
'token'.freeze
- JSON_PROPERTY_BILLING_CONTACT =
'billingContact'.freeze
- JSON_PROPERTY_SHIPPING_CONTACT =
'shippingContact'.freeze
Instance Attribute Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(token = nil, billing_contact = nil, shipping_contact = nil) ⇒ ApplePayPayment
constructor
A new instance of ApplePayPayment.
- #to_s ⇒ Object
Constructor Details
#initialize(token = nil, billing_contact = nil, shipping_contact = nil) ⇒ ApplePayPayment
Returns a new instance of ApplePayPayment.
13 14 15 16 17 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 13 def initialize(token = nil, billing_contact = nil, shipping_contact = nil) @token = token @billing_contact = billing_contact @shipping_contact = shipping_contact end |
Instance Attribute Details
#billing_contact ⇒ Object
7 8 9 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 7 def billing_contact @billing_contact end |
#shipping_contact ⇒ Object
7 8 9 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 7 def shipping_contact @shipping_contact end |
#token ⇒ Object
7 8 9 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 7 def token @token end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
31 32 33 34 35 36 37 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 31 def ==(other) return true if self.equal?(other) return false unless other.is_a?(ApplePayPayment) token == other.token && billing_contact == other.billing_contact && shipping_contact == other.shipping_contact end |
#hash ⇒ Object
41 42 43 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 41 def hash [token, billing_contact, shipping_contact].hash end |
#to_s ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/PCP-server-Ruby-SDK/models/applepay/apple_pay_payment.rb', line 45 def to_s "class ApplePayPayment {\n" \ " token: #{to_indented_string(token)}\n" \ " billingContact: #{to_indented_string(billing_contact)}\n" \ " shippingContact: #{to_indented_string(shipping_contact)}\n" \ "}" end |