Class: Ingenico::Connect::SDK::Merchant::Hostedmandatemanagements::HostedmandatemanagementsClient
- Inherits:
-
ApiResource
- Object
- ApiResource
- Ingenico::Connect::SDK::Merchant::Hostedmandatemanagements::HostedmandatemanagementsClient
- Defined in:
- lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb
Overview
Hostedmandatemanagements client. Thread-safe.
Instance Attribute Summary
Attributes inherited from ApiResource
#client_meta_info, #communicator
Instance Method Summary collapse
-
#create(body, context = nil) ⇒ Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::CreateHostedMandateManagementResponse
Resource /{merchantId}/hostedmandatemanagements - Create hosted mandate management.
-
#get(hosted_mandate_management_id, context = nil) ⇒ Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::GetHostedMandateManagementResponse
Resource /{merchantId}/hostedmandatemanagements/{hostedMandateManagementId} - Get hosted mandate management status.
-
#initialize(parent, path_context) ⇒ HostedmandatemanagementsClient
constructor
A new instance of HostedmandatemanagementsClient.
Constructor Details
#initialize(parent, path_context) ⇒ HostedmandatemanagementsClient
Returns a new instance of HostedmandatemanagementsClient.
20 21 22 |
# File 'lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb', line 20 def initialize(parent, path_context) super(parent, path_context) end |
Instance Method Details
#create(body, context = nil) ⇒ Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::CreateHostedMandateManagementResponse
Resource /{merchantId}/hostedmandatemanagements - Create hosted mandate management
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb', line 37 def create(body, context=nil) uri = instantiate_uri('/v1/{merchantId}/hostedmandatemanagements', nil) return @communicator.post( uri, client_headers, nil, body, Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::CreateHostedMandateManagementResponse, context) rescue ResponseException => e error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise create_exception(e.status_code, e.body, error_object, context) end |
#get(hosted_mandate_management_id, context = nil) ⇒ Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::GetHostedMandateManagementResponse
Resource /{merchantId}/hostedmandatemanagements/{hostedMandateManagementId} - Get hosted mandate management status
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb', line 65 def get(hosted_mandate_management_id, context=nil) path_context = { 'hostedMandateManagementId'.freeze => hosted_mandate_management_id, } uri = instantiate_uri('/v1/{merchantId}/hostedmandatemanagements/{hostedMandateManagementId}', path_context) return @communicator.get( uri, client_headers, nil, Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::GetHostedMandateManagementResponse, context) rescue ResponseException => e error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise create_exception(e.status_code, e.body, error_object, context) end |