Class: AmexTokenizationClient::ProvisioningPayload
- Inherits:
-
Object
- Object
- AmexTokenizationClient::ProvisioningPayload
- Defined in:
- lib/amex_tokenization_client/provisioning_payload.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#expiry_month ⇒ Object
readonly
Returns the value of attribute expiry_month.
-
#expiry_year ⇒ Object
readonly
Returns the value of attribute expiry_year.
-
#ip_address ⇒ Object
readonly
Returns the value of attribute ip_address.
-
#is_on_file ⇒ Object
readonly
Returns the value of attribute is_on_file.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(account_number:, name:, expiry_month:, expiry_year:, email:, is_on_file:, ip_address: nil) ⇒ ProvisioningPayload
constructor
A new instance of ProvisioningPayload.
- #to_json(encryption_key_id, encryption_key) ⇒ Object
Constructor Details
#initialize(account_number:, name:, expiry_month:, expiry_year:, email:, is_on_file:, ip_address: nil) ⇒ ProvisioningPayload
Returns a new instance of ProvisioningPayload.
8 9 10 11 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 8 def initialize(account_number:, name:, expiry_month:, expiry_year:, email:, is_on_file:, ip_address: nil) @account_number, @expiry_month, @expiry_year = account_number, expiry_month, expiry_year @name, @email, @is_on_file, @ip_address = name, email, is_on_file, ip_address end |
Instance Attribute Details
#account_number ⇒ Object (readonly)
Returns the value of attribute account_number.
5 6 7 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 5 def account_number @account_number end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 6 def email @email end |
#expiry_month ⇒ Object (readonly)
Returns the value of attribute expiry_month.
5 6 7 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 5 def expiry_month @expiry_month end |
#expiry_year ⇒ Object (readonly)
Returns the value of attribute expiry_year.
5 6 7 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 5 def expiry_year @expiry_year end |
#ip_address ⇒ Object (readonly)
Returns the value of attribute ip_address.
6 7 8 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 6 def ip_address @ip_address end |
#is_on_file ⇒ Object (readonly)
Returns the value of attribute is_on_file.
6 7 8 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 6 def is_on_file @is_on_file end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 6 def name @name end |
Instance Method Details
#to_json(encryption_key_id, encryption_key) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 13 def to_json(encryption_key_id, encryption_key) Hash[ account_data: account_data(encryption_key_id, encryption_key), user_data: { name: name, email: email }, risk_assessment_data: risk_assessment_data ].to_json end |