Class: Tpaga::CreditCardCharge

Inherits:
BaseObject show all
Defined in:
lib/tpaga/models/credit_card_charge.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash

Constructor Details

#initialize(attributes = {}) ⇒ CreditCardCharge

Returns a new instance of CreditCardCharge.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/tpaga/models/credit_card_charge.rb', line 77

def initialize(attributes = {})
  return if !attributes.is_a?(Hash) || attributes.empty?

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'id']
    @id = attributes[:'id']
  end
  
  if attributes[:'amount']
    @amount = attributes[:'amount']
  end
  
  if attributes[:'taxAmount']
    @tax_amount = attributes[:'taxAmount']
  end
  
  if attributes[:'currency']
    @currency = attributes[:'currency']
  end
  
  if attributes[:'creditCard']
    @credit_card = attributes[:'creditCard']
  end
  
  if attributes[:'installments']
    @installments = attributes[:'installments']
  end
  
  if attributes[:'orderId']
    @order_id = attributes[:'orderId']
    end

  if attributes[:'thirdPartyId']
    @third_party_id = attributes[:'thirdPartyId']
  end
  
  if attributes[:'description']
    @description = attributes[:'description']
  end
  
  if attributes[:'paid']
    @paid = attributes[:'paid']
  end
  
  if attributes[:'customer']
    @customer = attributes[:'customer']
  end
  
  if attributes[:'paymentTransaction']
    @payment_transaction = attributes[:'paymentTransaction']
  end
  
  if attributes[:'transactionInfo']
    @transaction_info = attributes[:'transactionInfo']
  end
  
  if attributes[:'errorCode']
    @error_code = attributes[:'errorCode']
  end

  if attributes[:'errorMessage']
    @error_message = attributes[:'errorMessage']
  end
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def amount
  @amount
end

#credit_cardObject

Returns the value of attribute credit_card.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def credit_card
  @credit_card
end

#currencyObject

Returns the value of attribute currency.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def currency
  @currency
end

#customerObject

Returns the value of attribute customer.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def customer
  @customer
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def description
  @description
end

#error_codeObject

Returns the value of attribute error_code.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def error_code
  @error_code
end

#error_messageObject

Returns the value of attribute error_message.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def error_message
  @error_message
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def id
  @id
end

#installmentsObject

Returns the value of attribute installments.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def installments
  @installments
end

#order_idObject

Returns the value of attribute order_id.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def order_id
  @order_id
end

Returns the value of attribute paid.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def paid
  @paid
end

#payment_transactionObject

Returns the value of attribute payment_transaction.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def payment_transaction
  @payment_transaction
end

#tax_amountObject

Returns the value of attribute tax_amount.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def tax_amount
  @tax_amount
end

#third_party_idObject

Returns the value of attribute third_party_id.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def third_party_id
  @third_party_id
end

#transaction_infoObject

Returns the value of attribute transaction_info.



4
5
6
# File 'lib/tpaga/models/credit_card_charge.rb', line 4

def transaction_info
  @transaction_info
end

Class Method Details

.attribute_mapObject

attribute mapping from ruby-style variable name to JSON key



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/tpaga/models/credit_card_charge.rb', line 6

def self.attribute_map
  {
    
    # 
    :'id' => :'id',
    
    # 
    :'amount' => :'amount',
    
    # 
    :'tax_amount' => :'taxAmount',
    
    # 3-letter ISO code for currency.
    :'currency' => :'currency',
    
    # 
    :'credit_card' => :'creditCard',
    
    # The amount of payments to divide the charge amount.
    :'installments' => :'installments',
    
    # 
    :'order_id' => :'orderId',
    
    # 
    :'description' => :'description',

    #
    :'third_party_id' => :'thirdPartyId',

    # 
    :'paid' => :'paid',
    
    # 
    :'customer' => :'customer',
    
    # 
    :'payment_transaction' => :'paymentTransaction',
    
    # 
    :'transaction_info' => :'transactionInfo',
    
    #
    :'error_code' => :'errorCode',

    #
    :'error_message' => :'errorMessage',
  }
end

.swagger_typesObject

attribute type



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/tpaga/models/credit_card_charge.rb', line 57

def self.swagger_types
  {
    :'id' => :'string',
    :'amount' => :'number',
    :'tax_amount' => :'number',
    :'currency' => :'string',
    :'credit_card' => :'string',
    :'installments' => :'number',
    :'order_id' => :'string',
    :'third_party_id' => :'string',
    :'description' => :'string',
    :'paid' => :'boolean',
    :'customer' => :'string',
    :'payment_transaction' => :'string',
    :'transaction_info' => :'TransactionInfo',
    :'error_code' => :'string',
    :'error_message' => :'string',
  }
end