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.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(account_number:, name:, expiry_month:, expiry_year:, email:, is_on_file:, user_id: nil, 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:, user_id: nil, ip_address: nil) ⇒ ProvisioningPayload
Returns a new instance of ProvisioningPayload.
9 10 11 12 13 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 9 def initialize(account_number:, name:, expiry_month:, expiry_year:, email:, is_on_file:, user_id: nil, 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 @user_id = user_id 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 |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
7 8 9 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 7 def user_id @user_id end |
Instance Method Details
#to_json(encryption_key_id, encryption_key) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/amex_tokenization_client/provisioning_payload.rb', line 15 def to_json(encryption_key_id, encryption_key) Hash[ account_data: account_data(encryption_key_id, encryption_key), user_data: { user_id: user_id, name: name, email: email }.compact, risk_assessment_data: risk_assessment_data ].to_json end |