Class: Increase::Resources::CardDisputes

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/card_disputes.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardDisputes

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 CardDisputes.

Parameters:



149
150
151
# File 'lib/increase/resources/card_disputes.rb', line 149

def initialize(client:)
  @client = client
end

Instance Method Details

#create(disputed_transaction_id: , network: , amount: nil, attachment_files: nil, visa: nil, request_options: {}) ⇒ Increase::Models::CardDispute

Some parameter documentations has been truncated, see Models::CardDisputeCreateParams for more details.

Create a Card Dispute

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/increase/resources/card_disputes.rb', line 28

def create(params)
  parsed, options = Increase::CardDisputeCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "card_disputes",
    body: parsed,
    model: Increase::CardDispute,
    options: options
  )
end

#list(created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CardDispute>

Some parameter documentations has been truncated, see Models::CardDisputeListParams for more details.

List Card Disputes

Parameters:

Returns:

See Also:



81
82
83
84
85
86
87
88
89
90
91
# File 'lib/increase/resources/card_disputes.rb', line 81

def list(params = {})
  parsed, options = Increase::CardDisputeListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "card_disputes",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::CardDispute,
    options: options
  )
end

#retrieve(card_dispute_id, request_options: {}) ⇒ Increase::Models::CardDispute

Retrieve a Card Dispute

Parameters:

  • card_dispute_id (String)

    The identifier of the Card Dispute.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



50
51
52
53
54
55
56
57
# File 'lib/increase/resources/card_disputes.rb', line 50

def retrieve(card_dispute_id, params = {})
  @client.request(
    method: :get,
    path: ["card_disputes/%1$s", card_dispute_id],
    model: Increase::CardDispute,
    options: params[:request_options]
  )
end

#submit_user_submission(card_dispute_id, network: , amount: nil, attachment_files: nil, visa: nil, request_options: {}) ⇒ Increase::Models::CardDispute

Some parameter documentations has been truncated, see Models::CardDisputeSubmitUserSubmissionParams for more details.

Submit a User Submission for a Card Dispute

Parameters:

Returns:

See Also:



115
116
117
118
119
120
121
122
123
124
# File 'lib/increase/resources/card_disputes.rb', line 115

def submit_user_submission(card_dispute_id, params)
  parsed, options = Increase::CardDisputeSubmitUserSubmissionParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["card_disputes/%1$s/submit_user_submission", card_dispute_id],
    body: parsed,
    model: Increase::CardDispute,
    options: options
  )
end

#withdraw(card_dispute_id, request_options: {}) ⇒ Increase::Models::CardDispute

Withdraw a Card Dispute

Parameters:

  • card_dispute_id (String)

    The identifier of the Card Dispute to withdraw.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



137
138
139
140
141
142
143
144
# File 'lib/increase/resources/card_disputes.rb', line 137

def withdraw(card_dispute_id, params = {})
  @client.request(
    method: :post,
    path: ["card_disputes/%1$s/withdraw", card_dispute_id],
    model: Increase::CardDispute,
    options: params[:request_options]
  )
end