Class: Moov::Models::Components::Capture

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/capture.rb

Overview

Details of a capture against an authorized transfer.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(capture_id:, amount:, is_final:, status:, created_on:, destination_payment_method_id:, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, facilitator_fee_amount: nil) ⇒ Capture

Returns a new instance of Capture.



42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/moov/models/components/capture.rb', line 42

def initialize(capture_id:, amount:, is_final:, status:, created_on:, destination_payment_method_id:, description: nil, metadata: nil, foreign_id: nil, line_items: nil, amount_details: nil, facilitator_fee_amount: nil)
  @capture_id = capture_id
  @amount = amount
  @is_final = is_final
  @status = status
  @created_on = created_on
  @destination_payment_method_id = destination_payment_method_id
  @description = description
  @metadata = 
  @foreign_id = foreign_id
  @line_items = line_items
  @amount_details = amount_details
  @facilitator_fee_amount = facilitator_fee_amount
end

Instance Method Details

#==(other) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/moov/models/components/capture.rb', line 58

def ==(other)
  return false unless other.is_a? self.class
  return false unless @capture_id == other.capture_id
  return false unless @amount == other.amount
  return false unless @is_final == other.is_final
  return false unless @status == other.status
  return false unless @created_on == other.created_on
  return false unless @destination_payment_method_id == other.destination_payment_method_id
  return false unless @description == other.description
  return false unless @metadata == other.
  return false unless @foreign_id == other.foreign_id
  return false unless @line_items == other.line_items
  return false unless @amount_details == other.amount_details
  return false unless @facilitator_fee_amount == other.facilitator_fee_amount
  true
end