Class: Unit::ApiToken::Customer::CreateCustomerTokenVerification
- Inherits:
-
Object
- Object
- Unit::ApiToken::Customer::CreateCustomerTokenVerification
- Defined in:
- lib/unit/models/api_token/customer/create_customer_token_verification.rb
Instance Attribute Summary collapse
-
#app_hash ⇒ Object
readonly
Returns the value of attribute app_hash.
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
-
#initialize(customer_id, channel, phone = nil, app_hash = nil, language = nil) ⇒ CreateCustomerTokenVerification
constructor
A new instance of CreateCustomerTokenVerification.
- #to_json_api ⇒ Object
Constructor Details
#initialize(customer_id, channel, phone = nil, app_hash = nil, language = nil) ⇒ CreateCustomerTokenVerification
Returns a new instance of CreateCustomerTokenVerification.
16 17 18 19 20 21 22 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 16 def initialize(customer_id, channel, phone = nil, app_hash = nil, language = nil) @customer_id = customer_id @channel = channel @phone = phone @app_hash = app_hash @language = language end |
Instance Attribute Details
#app_hash ⇒ Object (readonly)
Returns the value of attribute app_hash.
9 10 11 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 9 def app_hash @app_hash end |
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
9 10 11 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 9 def channel @channel end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
9 10 11 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 9 def customer_id @customer_id end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
9 10 11 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 9 def language @language end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
9 10 11 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 9 def phone @phone end |
Instance Method Details
#to_json_api ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/unit/models/api_token/customer/create_customer_token_verification.rb', line 24 def to_json_api result = { data: { type: "customerTokenVerification", attributes: { channel: channel, phone: phone&.represent, appHash: app_hash, language: language } } } result[:data][:attributes].compact! result.to_json end |