Class: Worldline::Connect::SDK::V1::Merchant::Productgroups::ProductgroupsClient
- Inherits:
-
ApiResource
- Object
- ApiResource
- Worldline::Connect::SDK::V1::Merchant::Productgroups::ProductgroupsClient
- Defined in:
- lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb
Overview
Productgroups client. Thread-safe.
Instance Attribute Summary
Attributes inherited from ApiResource
#client_meta_info, #communicator
Instance Method Summary collapse
-
#device_fingerprint(payment_product_group_id, body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DeviceFingerprintResponse
Resource /{merchantId}/productgroups/{paymentProductGroupId}/deviceFingerprint - Get device fingerprint.
-
#find(query, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductGroups
Resource /{merchantId}/productgroups - Get payment product groups.
-
#get(payment_product_group_id, query, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductGroupResponse
Resource /{merchantId}/productgroups/{paymentProductGroupId} - Get payment product group.
-
#initialize(parent, path_context) ⇒ ProductgroupsClient
constructor
A new instance of ProductgroupsClient.
Constructor Details
#initialize(parent, path_context) ⇒ ProductgroupsClient
Returns a new instance of ProductgroupsClient.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb', line 24 def initialize(parent, path_context) super(parent: parent, path_context: path_context) end |
Instance Method Details
#device_fingerprint(payment_product_group_id, body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DeviceFingerprintResponse
Resource /{merchantId}/productgroups/{paymentProductGroupId}/deviceFingerprint - Get device fingerprint
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb', line 103 def device_fingerprint(payment_product_group_id, body, context = nil) path_context = { 'paymentProductGroupId'.freeze => payment_product_group_id, } uri = instantiate_uri('/v1/{merchantId}/productgroups/{paymentProductGroupId}/deviceFingerprint', path_context) @communicator.post( uri, client_headers, nil, body, Worldline::Connect::SDK::V1::Domain::DeviceFingerprintResponse, context) rescue ResponseException => e error_type = Worldline::Connect::SDK::V1::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise Worldline::Connect::SDK::V1.create_exception(e.status_code, e.body, error_object, context) end |
#find(query, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductGroups
Resource /{merchantId}/productgroups - Get payment product groups
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb', line 42 def find(query, context = nil) uri = instantiate_uri('/v1/{merchantId}/productgroups', nil) @communicator.get( uri, client_headers, query, Worldline::Connect::SDK::V1::Domain::PaymentProductGroups, context) rescue ResponseException => e error_type = Worldline::Connect::SDK::V1::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise Worldline::Connect::SDK::V1.create_exception(e.status_code, e.body, error_object, context) end |
#get(payment_product_group_id, query, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductGroupResponse
Resource /{merchantId}/productgroups/{paymentProductGroupId} - Get payment product group
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/worldline/connect/sdk/v1/merchant/productgroups/productgroups_client.rb', line 71 def get(payment_product_group_id, query, context = nil) path_context = { 'paymentProductGroupId'.freeze => payment_product_group_id, } uri = instantiate_uri('/v1/{merchantId}/productgroups/{paymentProductGroupId}', path_context) @communicator.get( uri, client_headers, query, Worldline::Connect::SDK::V1::Domain::PaymentProductGroupResponse, context) rescue ResponseException => e error_type = Worldline::Connect::SDK::V1::Domain::ErrorResponse error_object = @communicator.marshaller.unmarshal(e.body, error_type) raise Worldline::Connect::SDK::V1.create_exception(e.status_code, e.body, error_object, context) end |