Class: OnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest
- Defined in:
- lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb
Instance Attribute Summary collapse
-
#billing_agreement ⇒ String
The current value of billing_agreement.
-
#management_url ⇒ String
The current value of management_url.
-
#payment_description ⇒ String
The current value of payment_description.
-
#regular_billing ⇒ OnlinePayments::SDK::Domain::ApplePayLineItem
The current value of regular_billing.
-
#trial_billing ⇒ OnlinePayments::SDK::Domain::ApplePayLineItem
The current value of trial_billing.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#billing_agreement ⇒ String
Returns the current value of billing_agreement.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 15 def billing_agreement @billing_agreement end |
#management_url ⇒ String
Returns the current value of management_url.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 15 def management_url @management_url end |
#payment_description ⇒ String
Returns the current value of payment_description.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 15 def payment_description @payment_description end |
#regular_billing ⇒ OnlinePayments::SDK::Domain::ApplePayLineItem
Returns the current value of regular_billing.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 15 def regular_billing @regular_billing end |
#trial_billing ⇒ OnlinePayments::SDK::Domain::ApplePayLineItem
Returns the current value of trial_billing.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 15 def trial_billing @trial_billing end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 38 def from_hash(hash) super if hash.has_key? 'billingAgreement' @billing_agreement = hash['billingAgreement'] end if hash.has_key? 'managementUrl' @management_url = hash['managementUrl'] end if hash.has_key? 'paymentDescription' @payment_description = hash['paymentDescription'] end if hash.has_key? 'regularBilling' raise TypeError, "value '%s' is not a Hash" % [hash['regularBilling']] unless hash['regularBilling'].is_a? Hash @regular_billing = OnlinePayments::SDK::Domain::ApplePayLineItem.new_from_hash(hash['regularBilling']) end if hash.has_key? 'trialBilling' raise TypeError, "value '%s' is not a Hash" % [hash['trialBilling']] unless hash['trialBilling'].is_a? Hash @trial_billing = OnlinePayments::SDK::Domain::ApplePayLineItem.new_from_hash(hash['trialBilling']) end end |
#to_h ⇒ Hash
28 29 30 31 32 33 34 35 36 |
# File 'lib/onlinepayments/sdk/domain/apple_pay_recurring_payment_request.rb', line 28 def to_h hash = super hash['billingAgreement'] = @billing_agreement unless @billing_agreement.nil? hash['managementUrl'] = @management_url unless @management_url.nil? hash['paymentDescription'] = @payment_description unless @payment_description.nil? hash['regularBilling'] = @regular_billing.to_h unless @regular_billing.nil? hash['trialBilling'] = @trial_billing.to_h unless @trial_billing.nil? hash end |