|
| 1 | +require_relative '../service' |
| 2 | +module Adyen |
| 3 | + |
| 4 | + # NOTE: This class is auto generated by OpenAPI Generator |
| 5 | + # Ref: https://openapi-generator.tech |
| 6 | + # |
| 7 | + # Do not edit the class manually. |
| 8 | + class AuthorizedCardUsersApi < Service |
| 9 | + attr_accessor :service, :version |
| 10 | + |
| 11 | + def initialize(client, version = DEFAULT_VERSION) |
| 12 | + super(client, version, 'BalancePlatform') |
| 13 | + end |
| 14 | + |
| 15 | + # Delete the authorized users for a card. |
| 16 | + def payment_instruments_payment_instrument_id_authorised_card_users_delete(payment_instrument_id, headers: {}) |
| 17 | + endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s') |
| 18 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 19 | + endpoint = format(endpoint, payment_instrument_id) |
| 20 | + |
| 21 | + action = { method: 'delete', url: endpoint } |
| 22 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 23 | + end |
| 24 | + |
| 25 | + # Get authorized users for a card. |
| 26 | + def payment_instruments_payment_instrument_id_authorised_card_users_get(payment_instrument_id, headers: {}) |
| 27 | + endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s') |
| 28 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 29 | + endpoint = format(endpoint, payment_instrument_id) |
| 30 | + |
| 31 | + action = { method: 'get', url: endpoint } |
| 32 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 33 | + end |
| 34 | + |
| 35 | + # Update the authorized users for a card. |
| 36 | + def payment_instruments_payment_instrument_id_authorised_card_users_patch(request, payment_instrument_id, authorised_card_users, headers: {}) |
| 37 | + endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s') |
| 38 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 39 | + endpoint = format(endpoint, payment_instrument_id) |
| 40 | + |
| 41 | + action = { method: 'patch', url: endpoint } |
| 42 | + @client.call_adyen_api(@service, action, request, headers, @version) |
| 43 | + end |
| 44 | + |
| 45 | + # Create authorized users for a card. |
| 46 | + def payment_instruments_payment_instrument_id_authorised_card_users_post(request, payment_instrument_id, authorised_card_users, headers: {}) |
| 47 | + endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s') |
| 48 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 49 | + endpoint = format(endpoint, payment_instrument_id) |
| 50 | + |
| 51 | + action = { method: 'post', url: endpoint } |
| 52 | + @client.call_adyen_api(@service, action, request, headers, @version) |
| 53 | + end |
| 54 | + |
| 55 | + end |
| 56 | +end |
0 commit comments