Class: Lithic::Resources::Tokenizations
- Inherits:
-
Object
- Object
- Lithic::Resources::Tokenizations
- Defined in:
- lib/lithic/resources/tokenizations.rb,
sig/lithic/resources/tokenizations.rbs
Instance Method Summary collapse
-
#activate(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to activate a tokenization.
-
#deactivate(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to deactivate a tokenization.
-
#initialize(client:) ⇒ Tokenizations
constructor
private
A new instance of Tokenizations.
-
#list(account_token: nil, begin_: nil, card_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, tokenization_channel: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::Tokenization>
Some parameter documentations has been truncated, see Models::TokenizationListParams for more details.
-
#pause(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to pause a tokenization.
-
#resend_activation_code(tokenization_token, activation_method_type: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::TokenizationResendActivationCodeParams for more details.
-
#retrieve(tokenization_token, request_options: {}) ⇒ Lithic::Models::Tokenization
Get tokenization.
-
#simulate(cvv:, expiration_date:, pan:, tokenization_source:, account_score: nil, device_score: nil, entity: nil, wallet_recommended_decision: nil, request_options: {}) ⇒ Lithic::Models::Tokenization
Some parameter documentations has been truncated, see Models::TokenizationSimulateParams for more details.
-
#unpause(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to unpause a tokenization.
-
#update_digital_card_art(tokenization_token, digital_card_art_token: nil, request_options: {}) ⇒ Lithic::Models::Tokenization
Some parameter documentations has been truncated, see Models::TokenizationUpdateDigitalCardArtParams for more details.
Constructor Details
#initialize(client:) ⇒ Tokenizations
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Tokenizations.
288 289 290 |
# File 'lib/lithic/resources/tokenizations.rb', line 288 def initialize(client:) @client = client end |
Instance Method Details
#activate(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to activate a tokenization. A
successful response indicates that the request was successfully delivered to the
card network. When the card network activates the tokenization, the state will
be updated and a tokenization.updated event will be sent. The endpoint may only
be used on digital wallet tokenizations with status INACTIVE,
PENDING_ACTIVATION, or PENDING_2FA. This will put the tokenization in an
active state, and transactions will be allowed. Reach out at
lithic.com/contact for more information.
85 86 87 88 89 90 91 92 |
# File 'lib/lithic/resources/tokenizations.rb', line 85 def activate(tokenization_token, params = {}) @client.request( method: :post, path: ["v1/tokenizations/%1$s/activate", tokenization_token], model: NilClass, options: params[:request_options] ) end |
#deactivate(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to deactivate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network deactivates the tokenization, the state will be updated and a tokenization.updated event will be sent. Authorizations attempted with a deactivated tokenization will be blocked and will not be forwarded to Lithic from the network. Deactivating the token is a permanent operation. If the target is a digital wallet tokenization, it will be removed from its device. Reach out at lithic.com/contact for more information.
113 114 115 116 117 118 119 120 |
# File 'lib/lithic/resources/tokenizations.rb', line 113 def deactivate(tokenization_token, params = {}) @client.request( method: :post, path: ["v1/tokenizations/%1$s/deactivate", tokenization_token], model: NilClass, options: params[:request_options] ) end |
#list(account_token: nil, begin_: nil, card_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, tokenization_channel: nil, request_options: {}) ⇒ Lithic::Internal::CursorPage<Lithic::Models::Tokenization>
Some parameter documentations has been truncated, see Models::TokenizationListParams for more details.
List card tokenizations
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/lithic/resources/tokenizations.rb', line 54 def list(params = {}) parsed, = Lithic::TokenizationListParams.dump_request(params) query = Lithic::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/tokenizations", query: query.transform_keys(begin_: "begin", end_: "end"), page: Lithic::Internal::CursorPage, model: Lithic::Tokenization, options: ) end |
#pause(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to pause a tokenization. A
successful response indicates that the request was successfully delivered to the
card network. When the card network pauses the tokenization, the state will be
updated and a tokenization.updated event will be sent. The endpoint may only be
used on tokenizations with status ACTIVE. A paused token will prevent
merchants from sending authorizations, and is a temporary status that can be
changed. Reach out at lithic.com/contact for more
information.
140 141 142 143 144 145 146 147 |
# File 'lib/lithic/resources/tokenizations.rb', line 140 def pause(tokenization_token, params = {}) @client.request( method: :post, path: ["v1/tokenizations/%1$s/pause", tokenization_token], model: NilClass, options: params[:request_options] ) end |
#resend_activation_code(tokenization_token, activation_method_type: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::TokenizationResendActivationCodeParams for more details.
This endpoint is used to ask the card network to send another activation code to
a cardholder that has already tried tokenizing a card. A successful response
indicates that the request was successfully delivered to the card network. The
endpoint may only be used on Mastercard digital wallet tokenizations with status
INACTIVE, PENDING_ACTIVATION, or PENDING_2FA. The network will send a new
activation code to the one of the contact methods provided in the initial
tokenization flow. If a user fails to enter the code correctly 3 times, the
contact method will not be eligible for resending the activation code, and the
cardholder must restart the provision process. Reach out at
lithic.com/contact for more information.
174 175 176 177 178 179 180 181 182 183 |
# File 'lib/lithic/resources/tokenizations.rb', line 174 def resend_activation_code(tokenization_token, params = {}) parsed, = Lithic::TokenizationResendActivationCodeParams.dump_request(params) @client.request( method: :post, path: ["v1/tokenizations/%1$s/resend_activation_code", tokenization_token], body: parsed, model: NilClass, options: ) end |
#retrieve(tokenization_token, request_options: {}) ⇒ Lithic::Models::Tokenization
Get tokenization
17 18 19 20 21 22 23 24 |
# File 'lib/lithic/resources/tokenizations.rb', line 17 def retrieve(tokenization_token, params = {}) @client.request( method: :get, path: ["v1/tokenizations/%1$s", tokenization_token], model: Lithic::Tokenization, options: params[:request_options] ) end |
#simulate(cvv:, expiration_date:, pan:, tokenization_source:, account_score: nil, device_score: nil, entity: nil, wallet_recommended_decision: nil, request_options: {}) ⇒ Lithic::Models::Tokenization
Some parameter documentations has been truncated, see Models::TokenizationSimulateParams for more details.
This endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.
214 215 216 217 218 219 220 221 222 223 |
# File 'lib/lithic/resources/tokenizations.rb', line 214 def simulate(params) parsed, = Lithic::TokenizationSimulateParams.dump_request(params) @client.request( method: :post, path: "v1/simulate/tokenizations", body: parsed, model: Lithic::Tokenization, options: ) end |
#unpause(tokenization_token, request_options: {}) ⇒ nil
This endpoint is used to ask the card network to unpause a tokenization. A
successful response indicates that the request was successfully delivered to the
card network. When the card network unpauses the tokenization, the state will be
updated and a tokenization.updated event will be sent. The endpoint may only be
used on tokenizations with status PAUSED. This will put the tokenization in an
active state, and transactions may resume. Reach out at
lithic.com/contact for more information.
242 243 244 245 246 247 248 249 |
# File 'lib/lithic/resources/tokenizations.rb', line 242 def unpause(tokenization_token, params = {}) @client.request( method: :post, path: ["v1/tokenizations/%1$s/unpause", tokenization_token], model: NilClass, options: params[:request_options] ) end |
#update_digital_card_art(tokenization_token, digital_card_art_token: nil, request_options: {}) ⇒ Lithic::Models::Tokenization
Some parameter documentations has been truncated, see Models::TokenizationUpdateDigitalCardArtParams for more details.
This endpoint is used update the digital card art for a digital wallet
tokenization. A successful response indicates that the card network has updated
the tokenization's art, and the tokenization's digital_cart_art_token field
was updated. The endpoint may not be used on tokenizations with status
DEACTIVATED. Note that this updates the art for one specific tokenization, not
all tokenizations for a card. New tokenizations for a card will be created with
the art referenced in the card object's digital_card_art_token field. Reach
out at lithic.com/contact for more information.
274 275 276 277 278 279 280 281 282 283 |
# File 'lib/lithic/resources/tokenizations.rb', line 274 def update_digital_card_art(tokenization_token, params = {}) parsed, = Lithic::TokenizationUpdateDigitalCardArtParams.dump_request(params) @client.request( method: :post, path: ["v1/tokenizations/%1$s/update_digital_card_art", tokenization_token], body: parsed, model: Lithic::Tokenization, options: ) end |