Class: Worldline::Connect::SDK::V1::Merchant::Disputes::DisputesClient
- Inherits:
-
ApiResource
- Object
- ApiResource
- Worldline::Connect::SDK::V1::Merchant::Disputes::DisputesClient
- Defined in:
- lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb
Overview
Disputes client. Thread-safe.
Instance Attribute Summary
Attributes inherited from ApiResource
#client_meta_info, #communicator
Instance Method Summary collapse
-
#cancel(dispute_id, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Resource /{merchantId}/disputes/{disputeId}/cancel - Cancel dispute.
-
#get(dispute_id, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Resource /{merchantId}/disputes/{disputeId} - Get dispute.
-
#initialize(parent, path_context) ⇒ DisputesClient
constructor
A new instance of DisputesClient.
-
#submit(dispute_id, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Resource /{merchantId}/disputes/{disputeId}/submit - Submit dispute.
-
#upload_file(dispute_id, body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::UploadDisputeFileResponse
Resource /{merchantId}/disputes/{disputeId} - Upload File.
Constructor Details
#initialize(parent, path_context) ⇒ DisputesClient
Returns a new instance of DisputesClient.
23 24 25 |
# File 'lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb', line 23 def initialize(parent, path_context) super(parent: parent, path_context: path_context) end |
Instance Method Details
#cancel(dispute_id, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Resource /{merchantId}/disputes/{disputeId}/cancel - Cancel dispute
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb', line 104 def cancel(dispute_id, context = nil) path_context = { 'disputeId'.freeze => dispute_id, } uri = instantiate_uri('/v1/{merchantId}/disputes/{disputeId}/cancel', path_context) @communicator.post( uri, client_headers, nil, nil, Worldline::Connect::SDK::V1::Domain::DisputeResponse, 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(dispute_id, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Resource /{merchantId}/disputes/{disputeId} - Get dispute
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb', line 41 def get(dispute_id, context = nil) path_context = { 'disputeId'.freeze => dispute_id, } uri = instantiate_uri('/v1/{merchantId}/disputes/{disputeId}', path_context) @communicator.get( uri, client_headers, nil, Worldline::Connect::SDK::V1::Domain::DisputeResponse, 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 |
#submit(dispute_id, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::DisputeResponse
Resource /{merchantId}/disputes/{disputeId}/submit - Submit dispute
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb', line 72 def submit(dispute_id, context = nil) path_context = { 'disputeId'.freeze => dispute_id, } uri = instantiate_uri('/v1/{merchantId}/disputes/{disputeId}/submit', path_context) @communicator.post( uri, client_headers, nil, nil, Worldline::Connect::SDK::V1::Domain::DisputeResponse, 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 |
#upload_file(dispute_id, body, context = nil) ⇒ Worldline::Connect::SDK::V1::Domain::UploadDisputeFileResponse
Resource /{merchantId}/disputes/{disputeId} - Upload File
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/worldline/connect/sdk/v1/merchant/disputes/disputes_client.rb', line 137 def upload_file(dispute_id, body, context = nil) path_context = { 'disputeId'.freeze => dispute_id, } uri = instantiate_uri('/files/v1/{merchantId}/disputes/{disputeId}', path_context) @communicator.post( uri, client_headers, nil, body, Worldline::Connect::SDK::V1::Domain::UploadDisputeFileResponse, 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 |