digital_femsa 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +14 -0
- data/README.md +28 -33
- data/VERSION +1 -1
- data/config-ruby.json +1 -1
- data/docs/ApiKeyCreateResponse.md +1 -1
- data/docs/ApiKeyRequest.md +2 -2
- data/docs/ApiKeyResponseOnDelete.md +2 -2
- data/docs/ApiKeysApi.md +10 -10
- data/docs/BalanceResponse.md +8 -8
- data/docs/BalancesApi.md +1 -1
- data/docs/ChargeOrderResponse.md +1 -1
- data/docs/ChargeOrderResponseChannel.md +24 -0
- data/docs/ChargeRequest.md +1 -1
- data/docs/ChargeRequestPaymentMethod.md +3 -3
- data/docs/ChargeResponse.md +9 -7
- data/docs/ChargeResponseChannel.md +3 -3
- data/docs/ChargeResponseRefundsData.md +5 -1
- data/docs/ChargesApi.md +16 -12
- data/docs/ChargesDataResponse.md +9 -7
- data/docs/Checkout.md +17 -15
- data/docs/CheckoutOrderTemplate.md +3 -3
- data/docs/CheckoutResponse.md +1 -1
- data/docs/CreateCustomerFiscalEntitiesResponse.md +2 -2
- data/docs/Customer.md +13 -19
- data/docs/CustomerAddress.md +2 -2
- data/docs/CustomerFiscalEntitiesDataResponse.md +2 -2
- data/docs/CustomerFiscalEntitiesRequest.md +3 -3
- data/docs/CustomerInfo.md +4 -4
- data/docs/CustomerPaymentMethodRequest.md +1 -1
- data/docs/CustomerResponse.md +17 -21
- data/docs/CustomerShippingContactsResponse.md +5 -5
- data/docs/CustomersApi.md +15 -15
- data/docs/CustomersResponse.md +1 -1
- data/docs/DeleteApiKeysResponse.md +1 -1
- data/docs/DiscountsApi.md +9 -9
- data/docs/EventsApi.md +2 -2
- data/docs/EventsResendResponse.md +1 -1
- data/docs/GetChargesResponse.md +4 -4
- data/docs/GetTransactionsResponse.md +1 -1
- data/docs/LogsApi.md +1 -1
- data/docs/OrderFiscalEntityRequest.md +4 -4
- data/docs/OrderRefundRequest.md +7 -5
- data/docs/OrderRequest.md +17 -19
- data/docs/OrderResponse.md +37 -35
- data/docs/OrderResponseChannel.md +24 -0
- data/docs/OrderResponseShippingContact.md +4 -4
- data/docs/OrderUpdateFiscalEntityRequest.md +1 -1
- data/docs/OrderUpdateRequest.md +19 -15
- data/docs/OrdersApi.md +16 -16
- data/docs/PaymentLinkApi.md +12 -82
- data/docs/PaymentMethodCash.md +4 -4
- data/docs/PaymentMethodCashRequest.md +2 -2
- data/docs/PaymentMethodsApi.md +5 -5
- data/docs/Product.md +10 -12
- data/docs/ProductDataResponse.md +9 -11
- data/docs/ProductOrderResponse.md +9 -11
- data/docs/ProductsApi.md +7 -7
- data/docs/ShippingContactsApi.md +9 -9
- data/docs/ShippingOrderResponse.md +5 -3
- data/docs/ShippingRequest.md +2 -0
- data/docs/ShippingsApi.md +7 -7
- data/docs/TaxesApi.md +7 -7
- data/docs/TransactionResponse.md +20 -14
- data/docs/TransactionsApi.md +6 -6
- data/docs/TransfersApi.md +10 -10
- data/docs/UpdateCustomer.md +17 -21
- data/docs/UpdateCustomerFiscalEntitiesResponse.md +2 -2
- data/docs/UpdateOrderTaxRequest.md +2 -2
- data/docs/UpdateProduct.md +7 -9
- data/docs/WebhookKeysApi.md +18 -14
- data/docs/WebhooksApi.md +28 -22
- data/lib/digital_femsa/api/api_keys_api.rb +8 -8
- data/lib/digital_femsa/api/balances_api.rb +2 -2
- data/lib/digital_femsa/api/charges_api.rb +13 -9
- data/lib/digital_femsa/api/customers_api.rb +12 -12
- data/lib/digital_femsa/api/discounts_api.rb +12 -12
- data/lib/digital_femsa/api/events_api.rb +4 -4
- data/lib/digital_femsa/api/logs_api.rb +2 -2
- data/lib/digital_femsa/api/orders_api.rb +20 -20
- data/lib/digital_femsa/api/payment_link_api.rb +10 -86
- data/lib/digital_femsa/api/payment_methods_api.rb +8 -8
- data/lib/digital_femsa/api/products_api.rb +10 -10
- data/lib/digital_femsa/api/shipping_contacts_api.rb +8 -8
- data/lib/digital_femsa/api/shippings_api.rb +10 -10
- data/lib/digital_femsa/api/taxes_api.rb +10 -10
- data/lib/digital_femsa/api/transactions_api.rb +6 -6
- data/lib/digital_femsa/api/transfers_api.rb +8 -8
- data/lib/digital_femsa/api/webhook_keys_api.rb +14 -10
- data/lib/digital_femsa/api/webhooks_api.rb +23 -16
- data/lib/digital_femsa/api_client.rb +9 -5
- data/lib/digital_femsa/models/api_key_create_response.rb +1 -1
- data/lib/digital_femsa/models/api_key_request.rb +36 -1
- data/lib/digital_femsa/models/balance_response.rb +9 -9
- data/lib/digital_femsa/models/charge_order_response.rb +1 -1
- data/lib/digital_femsa/models/{order_next_action_response.rb → charge_order_response_channel.rb} +34 -18
- data/lib/digital_femsa/models/charge_request_payment_method.rb +3 -2
- data/lib/digital_femsa/models/charge_response.rb +15 -4
- data/lib/digital_femsa/models/charge_response_refunds_data.rb +23 -4
- data/lib/digital_femsa/models/charge_update_request.rb +1 -1
- data/lib/digital_femsa/models/charges_data_response.rb +15 -4
- data/lib/digital_femsa/models/checkout.rb +97 -81
- data/lib/digital_femsa/models/checkout_order_template.rb +4 -4
- data/lib/digital_femsa/models/checkout_order_template_customer_info.rb +1 -1
- data/lib/digital_femsa/models/checkout_request.rb +1 -1
- data/lib/digital_femsa/models/checkout_response.rb +1 -1
- data/lib/digital_femsa/models/create_customer_fiscal_entities_response.rb +10 -10
- data/lib/digital_femsa/models/customer.rb +57 -95
- data/lib/digital_femsa/models/customer_address.rb +7 -0
- data/lib/digital_femsa/models/customer_fiscal_entities_data_response.rb +10 -10
- data/lib/digital_femsa/models/customer_fiscal_entities_request.rb +13 -13
- data/lib/digital_femsa/models/customer_info.rb +13 -20
- data/lib/digital_femsa/models/customer_payment_method_request.rb +2 -2
- data/lib/digital_femsa/models/customer_payment_sources_inner.rb +104 -0
- data/lib/digital_femsa/models/customer_response.rb +122 -113
- data/lib/digital_femsa/models/customer_shipping_contacts_response.rb +2 -0
- data/lib/digital_femsa/models/customers_response.rb +1 -0
- data/lib/digital_femsa/models/events_resend_response.rb +1 -1
- data/lib/digital_femsa/models/get_charges_response.rb +21 -21
- data/lib/digital_femsa/models/get_transactions_response.rb +1 -1
- data/lib/digital_femsa/models/log_response.rb +1 -1
- data/lib/digital_femsa/models/logs_response.rb +1 -1
- data/lib/digital_femsa/models/order_fiscal_entity_response.rb +1 -1
- data/lib/digital_femsa/models/order_refund_request.rb +59 -11
- data/lib/digital_femsa/models/order_request.rb +69 -79
- data/lib/digital_femsa/models/order_response.rb +187 -119
- data/lib/digital_femsa/models/{order_next_action_response_redirect_to_url.rb → order_response_channel.rb} +35 -19
- data/lib/digital_femsa/models/order_response_charges.rb +1 -1
- data/lib/digital_femsa/models/order_response_checkout.rb +1 -0
- data/lib/digital_femsa/models/order_response_customer_info.rb +1 -0
- data/lib/digital_femsa/models/order_response_shipping_contact.rb +3 -0
- data/lib/digital_femsa/models/order_update_fiscal_entity_request.rb +1 -1
- data/lib/digital_femsa/models/order_update_request.rb +106 -65
- data/lib/digital_femsa/models/payment_method_cash.rb +1 -1
- data/lib/digital_femsa/models/payment_method_cash_request.rb +2 -1
- data/lib/digital_femsa/models/product.rb +103 -95
- data/lib/digital_femsa/models/product_data_response.rb +103 -95
- data/lib/digital_femsa/models/product_order_response.rb +103 -95
- data/lib/digital_femsa/models/shipping_order_response.rb +11 -1
- data/lib/digital_femsa/models/shipping_request.rb +12 -1
- data/lib/digital_femsa/models/transaction_response.rb +172 -99
- data/lib/digital_femsa/models/transfers_response.rb +1 -1
- data/lib/digital_femsa/models/transfers_response_destination.rb +312 -0
- data/lib/digital_femsa/models/update_customer.rb +42 -85
- data/lib/digital_femsa/models/update_customer_fiscal_entities_response.rb +10 -10
- data/lib/digital_femsa/models/update_order_discount_lines_request.rb +34 -0
- data/lib/digital_femsa/models/update_order_tax_request.rb +2 -2
- data/lib/digital_femsa/models/update_payment_methods_amount.rb +105 -0
- data/lib/digital_femsa/models/update_payment_methods_expires_at.rb +105 -0
- data/lib/digital_femsa/models/update_product.rb +85 -58
- data/lib/digital_femsa/models/webhook_key_delete_response.rb +1 -1
- data/lib/digital_femsa/models/webhook_key_request.rb +1 -0
- data/lib/digital_femsa/models/webhook_key_response.rb +1 -1
- data/lib/digital_femsa/models/webhook_request.rb +1 -1
- data/lib/digital_femsa/models/webhook_response.rb +1 -1
- data/lib/digital_femsa/models/webhook_update_request.rb +1 -1
- data/lib/digital_femsa/version.rb +1 -1
- data/lib/digital_femsa.rb +2 -6
- data/templates/ruby/api_client.mustache +8 -4
- metadata +26 -26
- data/docs/CustomerAntifraudInfo.md +0 -20
- data/docs/CustomerAntifraudInfoResponse.md +0 -20
- data/docs/OrderNextActionResponse.md +0 -20
- data/docs/OrderNextActionResponseRedirectToUrl.md +0 -20
- data/docs/SmsCheckoutRequest.md +0 -18
- data/docs/UpdateCustomerAntifraudInfo.md +0 -20
|
@@ -27,6 +27,9 @@ module DigitalFemsa
|
|
|
27
27
|
# Method of shipment
|
|
28
28
|
attr_accessor :method
|
|
29
29
|
|
|
30
|
+
# Shipping line description
|
|
31
|
+
attr_accessor :description
|
|
32
|
+
|
|
30
33
|
# Hash where the user can send additional information for each 'shipping'.
|
|
31
34
|
attr_accessor :metadata
|
|
32
35
|
|
|
@@ -43,6 +46,7 @@ module DigitalFemsa
|
|
|
43
46
|
:'carrier' => :'carrier',
|
|
44
47
|
:'tracking_number' => :'tracking_number',
|
|
45
48
|
:'method' => :'method',
|
|
49
|
+
:'description' => :'description',
|
|
46
50
|
:'metadata' => :'metadata',
|
|
47
51
|
:'id' => :'id',
|
|
48
52
|
:'object' => :'object',
|
|
@@ -62,6 +66,7 @@ module DigitalFemsa
|
|
|
62
66
|
:'carrier' => :'String',
|
|
63
67
|
:'tracking_number' => :'String',
|
|
64
68
|
:'method' => :'String',
|
|
69
|
+
:'description' => :'String',
|
|
65
70
|
:'metadata' => :'Hash<String, Object>',
|
|
66
71
|
:'id' => :'String',
|
|
67
72
|
:'object' => :'String',
|
|
@@ -115,6 +120,10 @@ module DigitalFemsa
|
|
|
115
120
|
self.method = attributes[:'method']
|
|
116
121
|
end
|
|
117
122
|
|
|
123
|
+
if attributes.key?(:'description')
|
|
124
|
+
self.description = attributes[:'description']
|
|
125
|
+
end
|
|
126
|
+
|
|
118
127
|
if attributes.key?(:'metadata')
|
|
119
128
|
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
120
129
|
self.metadata = value
|
|
@@ -201,6 +210,7 @@ module DigitalFemsa
|
|
|
201
210
|
carrier == o.carrier &&
|
|
202
211
|
tracking_number == o.tracking_number &&
|
|
203
212
|
method == o.method &&
|
|
213
|
+
description == o.description &&
|
|
204
214
|
metadata == o.metadata &&
|
|
205
215
|
id == o.id &&
|
|
206
216
|
object == o.object &&
|
|
@@ -216,7 +226,7 @@ module DigitalFemsa
|
|
|
216
226
|
# Calculates hash code according to all attributes.
|
|
217
227
|
# @return [Integer] Hash code
|
|
218
228
|
def hash
|
|
219
|
-
[amount, carrier, tracking_number, method, metadata, id, object, parent_id].hash
|
|
229
|
+
[amount, carrier, tracking_number, method, description, metadata, id, object, parent_id].hash
|
|
220
230
|
end
|
|
221
231
|
|
|
222
232
|
# Builds the object from hash
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
+
# Shipping line request payload.
|
|
17
18
|
class ShippingRequest
|
|
18
19
|
# Shipping amount in cents
|
|
19
20
|
attr_accessor :amount
|
|
@@ -27,6 +28,9 @@ module DigitalFemsa
|
|
|
27
28
|
# Method of shipment
|
|
28
29
|
attr_accessor :method
|
|
29
30
|
|
|
31
|
+
# Shipping line description
|
|
32
|
+
attr_accessor :description
|
|
33
|
+
|
|
30
34
|
# Hash where the user can send additional information for each 'shipping'.
|
|
31
35
|
attr_accessor :metadata
|
|
32
36
|
|
|
@@ -37,6 +41,7 @@ module DigitalFemsa
|
|
|
37
41
|
:'carrier' => :'carrier',
|
|
38
42
|
:'tracking_number' => :'tracking_number',
|
|
39
43
|
:'method' => :'method',
|
|
44
|
+
:'description' => :'description',
|
|
40
45
|
:'metadata' => :'metadata'
|
|
41
46
|
}
|
|
42
47
|
end
|
|
@@ -53,6 +58,7 @@ module DigitalFemsa
|
|
|
53
58
|
:'carrier' => :'String',
|
|
54
59
|
:'tracking_number' => :'String',
|
|
55
60
|
:'method' => :'String',
|
|
61
|
+
:'description' => :'String',
|
|
56
62
|
:'metadata' => :'Hash<String, Object>'
|
|
57
63
|
}
|
|
58
64
|
end
|
|
@@ -96,6 +102,10 @@ module DigitalFemsa
|
|
|
96
102
|
self.method = attributes[:'method']
|
|
97
103
|
end
|
|
98
104
|
|
|
105
|
+
if attributes.key?(:'description')
|
|
106
|
+
self.description = attributes[:'description']
|
|
107
|
+
end
|
|
108
|
+
|
|
99
109
|
if attributes.key?(:'metadata')
|
|
100
110
|
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
101
111
|
self.metadata = value
|
|
@@ -170,6 +180,7 @@ module DigitalFemsa
|
|
|
170
180
|
carrier == o.carrier &&
|
|
171
181
|
tracking_number == o.tracking_number &&
|
|
172
182
|
method == o.method &&
|
|
183
|
+
description == o.description &&
|
|
173
184
|
metadata == o.metadata
|
|
174
185
|
end
|
|
175
186
|
|
|
@@ -182,7 +193,7 @@ module DigitalFemsa
|
|
|
182
193
|
# Calculates hash code according to all attributes.
|
|
183
194
|
# @return [Integer] Hash code
|
|
184
195
|
def hash
|
|
185
|
-
[amount, carrier, tracking_number, method, metadata].hash
|
|
196
|
+
[amount, carrier, tracking_number, method, description, metadata].hash
|
|
186
197
|
end
|
|
187
198
|
|
|
188
199
|
# Builds the object from hash
|
|
@@ -14,55 +14,89 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
#
|
|
17
|
+
# Transaction object.
|
|
18
18
|
class TransactionResponse
|
|
19
|
+
# Unique identifier of the transaction.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# Object name, which is transaction.
|
|
23
|
+
attr_accessor :object
|
|
24
|
+
|
|
19
25
|
# The amount of the transaction.
|
|
20
26
|
attr_accessor :amount
|
|
21
27
|
|
|
22
|
-
#
|
|
23
|
-
attr_accessor :
|
|
28
|
+
# The amount to be deducted for taxes and commissions.
|
|
29
|
+
attr_accessor :fee
|
|
24
30
|
|
|
25
|
-
#
|
|
26
|
-
attr_accessor :
|
|
31
|
+
# The net amount after deducting commissions and taxes.
|
|
32
|
+
attr_accessor :net
|
|
27
33
|
|
|
28
|
-
# The currency of the transaction. It uses the 3-letter code of
|
|
34
|
+
# The currency of the transaction. It uses the 3-letter code of ISO 4217.
|
|
29
35
|
attr_accessor :currency
|
|
30
36
|
|
|
31
|
-
#
|
|
32
|
-
attr_accessor :
|
|
37
|
+
# Code indicating transaction status.
|
|
38
|
+
attr_accessor :status
|
|
33
39
|
|
|
34
|
-
#
|
|
35
|
-
attr_accessor :
|
|
40
|
+
# Transaction type.
|
|
41
|
+
attr_accessor :type
|
|
42
|
+
|
|
43
|
+
# Date and time of creation of the transaction in Unix format.
|
|
44
|
+
attr_accessor :created_at
|
|
36
45
|
|
|
37
46
|
# Indicates whether the transaction was created in live mode or test mode.
|
|
38
47
|
attr_accessor :livemode
|
|
39
48
|
|
|
40
|
-
#
|
|
41
|
-
attr_accessor :
|
|
49
|
+
# Charge ID associated with the transaction (present only if the transaction belongs to a charge).
|
|
50
|
+
attr_accessor :charge
|
|
42
51
|
|
|
43
|
-
#
|
|
44
|
-
attr_accessor :
|
|
52
|
+
# Transfer ID associated with the transaction (present only if the transaction belongs to a transfer).
|
|
53
|
+
attr_accessor :transfer
|
|
45
54
|
|
|
46
|
-
#
|
|
47
|
-
attr_accessor :
|
|
55
|
+
# Date and time when the transaction was transferred, in Unix format.
|
|
56
|
+
attr_accessor :transferred_at
|
|
48
57
|
|
|
49
|
-
# Transaction
|
|
50
|
-
attr_accessor :
|
|
58
|
+
# Transaction fee formula identifier (if available).
|
|
59
|
+
attr_accessor :formula
|
|
60
|
+
|
|
61
|
+
class EnumAttributeValidator
|
|
62
|
+
attr_reader :datatype
|
|
63
|
+
attr_reader :allowable_values
|
|
64
|
+
|
|
65
|
+
def initialize(datatype, allowable_values)
|
|
66
|
+
@allowable_values = allowable_values.map do |value|
|
|
67
|
+
case datatype.to_s
|
|
68
|
+
when /Integer/i
|
|
69
|
+
value.to_i
|
|
70
|
+
when /Float/i
|
|
71
|
+
value.to_f
|
|
72
|
+
else
|
|
73
|
+
value
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def valid?(value)
|
|
79
|
+
!value || allowable_values.include?(value)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
51
82
|
|
|
52
83
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
84
|
def self.attribute_map
|
|
54
85
|
{
|
|
86
|
+
:'id' => :'id',
|
|
87
|
+
:'object' => :'object',
|
|
55
88
|
:'amount' => :'amount',
|
|
56
|
-
:'charge' => :'charge',
|
|
57
|
-
:'created_at' => :'created_at',
|
|
58
|
-
:'currency' => :'currency',
|
|
59
89
|
:'fee' => :'fee',
|
|
60
|
-
:'id' => :'id',
|
|
61
|
-
:'livemode' => :'livemode',
|
|
62
90
|
:'net' => :'net',
|
|
63
|
-
:'
|
|
91
|
+
:'currency' => :'currency',
|
|
64
92
|
:'status' => :'status',
|
|
65
|
-
:'type' => :'type'
|
|
93
|
+
:'type' => :'type',
|
|
94
|
+
:'created_at' => :'created_at',
|
|
95
|
+
:'livemode' => :'livemode',
|
|
96
|
+
:'charge' => :'charge',
|
|
97
|
+
:'transfer' => :'transfer',
|
|
98
|
+
:'transferred_at' => :'transferred_at',
|
|
99
|
+
:'formula' => :'formula'
|
|
66
100
|
}
|
|
67
101
|
end
|
|
68
102
|
|
|
@@ -74,23 +108,30 @@ module DigitalFemsa
|
|
|
74
108
|
# Attribute type mapping.
|
|
75
109
|
def self.openapi_types
|
|
76
110
|
{
|
|
111
|
+
:'id' => :'String',
|
|
112
|
+
:'object' => :'String',
|
|
77
113
|
:'amount' => :'Integer',
|
|
78
|
-
:'charge' => :'String',
|
|
79
|
-
:'created_at' => :'Integer',
|
|
80
|
-
:'currency' => :'String',
|
|
81
114
|
:'fee' => :'Integer',
|
|
82
|
-
:'id' => :'String',
|
|
83
|
-
:'livemode' => :'Boolean',
|
|
84
115
|
:'net' => :'Integer',
|
|
85
|
-
:'
|
|
116
|
+
:'currency' => :'String',
|
|
86
117
|
:'status' => :'String',
|
|
87
|
-
:'type' => :'String'
|
|
118
|
+
:'type' => :'String',
|
|
119
|
+
:'created_at' => :'Integer',
|
|
120
|
+
:'livemode' => :'Boolean',
|
|
121
|
+
:'charge' => :'String',
|
|
122
|
+
:'transfer' => :'String',
|
|
123
|
+
:'transferred_at' => :'Integer',
|
|
124
|
+
:'formula' => :'String'
|
|
88
125
|
}
|
|
89
126
|
end
|
|
90
127
|
|
|
91
128
|
# List of attributes with nullable: true
|
|
92
129
|
def self.openapi_nullable
|
|
93
130
|
Set.new([
|
|
131
|
+
:'charge',
|
|
132
|
+
:'transfer',
|
|
133
|
+
:'transferred_at',
|
|
134
|
+
:'formula'
|
|
94
135
|
])
|
|
95
136
|
end
|
|
96
137
|
|
|
@@ -109,28 +150,22 @@ module DigitalFemsa
|
|
|
109
150
|
h[k.to_sym] = v
|
|
110
151
|
}
|
|
111
152
|
|
|
112
|
-
if attributes.key?(:'
|
|
113
|
-
self.
|
|
114
|
-
else
|
|
115
|
-
self.amount = nil
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
if attributes.key?(:'charge')
|
|
119
|
-
self.charge = attributes[:'charge']
|
|
153
|
+
if attributes.key?(:'id')
|
|
154
|
+
self.id = attributes[:'id']
|
|
120
155
|
else
|
|
121
|
-
self.
|
|
156
|
+
self.id = nil
|
|
122
157
|
end
|
|
123
158
|
|
|
124
|
-
if attributes.key?(:'
|
|
125
|
-
self.
|
|
159
|
+
if attributes.key?(:'object')
|
|
160
|
+
self.object = attributes[:'object']
|
|
126
161
|
else
|
|
127
|
-
self.
|
|
162
|
+
self.object = nil
|
|
128
163
|
end
|
|
129
164
|
|
|
130
|
-
if attributes.key?(:'
|
|
131
|
-
self.
|
|
165
|
+
if attributes.key?(:'amount')
|
|
166
|
+
self.amount = attributes[:'amount']
|
|
132
167
|
else
|
|
133
|
-
self.
|
|
168
|
+
self.amount = nil
|
|
134
169
|
end
|
|
135
170
|
|
|
136
171
|
if attributes.key?(:'fee')
|
|
@@ -139,28 +174,16 @@ module DigitalFemsa
|
|
|
139
174
|
self.fee = nil
|
|
140
175
|
end
|
|
141
176
|
|
|
142
|
-
if attributes.key?(:'id')
|
|
143
|
-
self.id = attributes[:'id']
|
|
144
|
-
else
|
|
145
|
-
self.id = nil
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
if attributes.key?(:'livemode')
|
|
149
|
-
self.livemode = attributes[:'livemode']
|
|
150
|
-
else
|
|
151
|
-
self.livemode = nil
|
|
152
|
-
end
|
|
153
|
-
|
|
154
177
|
if attributes.key?(:'net')
|
|
155
178
|
self.net = attributes[:'net']
|
|
156
179
|
else
|
|
157
180
|
self.net = nil
|
|
158
181
|
end
|
|
159
182
|
|
|
160
|
-
if attributes.key?(:'
|
|
161
|
-
self.
|
|
183
|
+
if attributes.key?(:'currency')
|
|
184
|
+
self.currency = attributes[:'currency']
|
|
162
185
|
else
|
|
163
|
-
self.
|
|
186
|
+
self.currency = nil
|
|
164
187
|
end
|
|
165
188
|
|
|
166
189
|
if attributes.key?(:'status')
|
|
@@ -174,51 +197,67 @@ module DigitalFemsa
|
|
|
174
197
|
else
|
|
175
198
|
self.type = nil
|
|
176
199
|
end
|
|
177
|
-
end
|
|
178
200
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
invalid_properties = Array.new
|
|
184
|
-
if @amount.nil?
|
|
185
|
-
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
|
201
|
+
if attributes.key?(:'created_at')
|
|
202
|
+
self.created_at = attributes[:'created_at']
|
|
203
|
+
else
|
|
204
|
+
self.created_at = nil
|
|
186
205
|
end
|
|
187
206
|
|
|
188
|
-
if
|
|
189
|
-
|
|
207
|
+
if attributes.key?(:'livemode')
|
|
208
|
+
self.livemode = attributes[:'livemode']
|
|
209
|
+
else
|
|
210
|
+
self.livemode = nil
|
|
190
211
|
end
|
|
191
212
|
|
|
192
|
-
if
|
|
193
|
-
|
|
213
|
+
if attributes.key?(:'charge')
|
|
214
|
+
self.charge = attributes[:'charge']
|
|
194
215
|
end
|
|
195
216
|
|
|
196
|
-
if
|
|
197
|
-
|
|
217
|
+
if attributes.key?(:'transfer')
|
|
218
|
+
self.transfer = attributes[:'transfer']
|
|
198
219
|
end
|
|
199
220
|
|
|
200
|
-
if
|
|
201
|
-
|
|
221
|
+
if attributes.key?(:'transferred_at')
|
|
222
|
+
self.transferred_at = attributes[:'transferred_at']
|
|
202
223
|
end
|
|
203
224
|
|
|
204
|
-
if
|
|
205
|
-
|
|
225
|
+
if attributes.key?(:'formula')
|
|
226
|
+
self.formula = attributes[:'formula']
|
|
206
227
|
end
|
|
228
|
+
end
|
|
207
229
|
|
|
230
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
231
|
+
# @return Array for valid properties with the reasons
|
|
232
|
+
def list_invalid_properties
|
|
233
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
234
|
+
invalid_properties = Array.new
|
|
208
235
|
if @id.nil?
|
|
209
236
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
210
237
|
end
|
|
211
238
|
|
|
212
|
-
if @
|
|
213
|
-
invalid_properties.push('invalid value for "
|
|
239
|
+
if @object.nil?
|
|
240
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if @amount.nil?
|
|
244
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if @fee.nil?
|
|
248
|
+
invalid_properties.push('invalid value for "fee", fee cannot be nil.')
|
|
214
249
|
end
|
|
215
250
|
|
|
216
251
|
if @net.nil?
|
|
217
252
|
invalid_properties.push('invalid value for "net", net cannot be nil.')
|
|
218
253
|
end
|
|
219
254
|
|
|
220
|
-
if @
|
|
221
|
-
invalid_properties.push('invalid value for "
|
|
255
|
+
if @currency.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if @currency.to_s.length > 3
|
|
260
|
+
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
|
222
261
|
end
|
|
223
262
|
|
|
224
263
|
if @status.nil?
|
|
@@ -229,6 +268,14 @@ module DigitalFemsa
|
|
|
229
268
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
230
269
|
end
|
|
231
270
|
|
|
271
|
+
if @created_at.nil?
|
|
272
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if @livemode.nil?
|
|
276
|
+
invalid_properties.push('invalid value for "livemode", livemode cannot be nil.')
|
|
277
|
+
end
|
|
278
|
+
|
|
232
279
|
invalid_properties
|
|
233
280
|
end
|
|
234
281
|
|
|
@@ -236,18 +283,21 @@ module DigitalFemsa
|
|
|
236
283
|
# @return true if the model is valid
|
|
237
284
|
def valid?
|
|
238
285
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
286
|
+
return false if @id.nil?
|
|
287
|
+
return false if @object.nil?
|
|
239
288
|
return false if @amount.nil?
|
|
240
|
-
return false if @charge.nil?
|
|
241
|
-
return false if @created_at.nil?
|
|
242
|
-
return false if @currency.nil?
|
|
243
|
-
return false if @currency.to_s.length > 3
|
|
244
289
|
return false if @fee.nil?
|
|
245
|
-
return false if @id.nil?
|
|
246
|
-
return false if @livemode.nil?
|
|
247
290
|
return false if @net.nil?
|
|
248
|
-
return false if @
|
|
291
|
+
return false if @currency.nil?
|
|
292
|
+
return false if @currency.to_s.length > 3
|
|
249
293
|
return false if @status.nil?
|
|
294
|
+
status_validator = EnumAttributeValidator.new('String', ["unprocessed", "pending", "available", "owing", "paid_out", "on_hold", "retained", "voided"])
|
|
295
|
+
return false unless status_validator.valid?(@status)
|
|
250
296
|
return false if @type.nil?
|
|
297
|
+
type_validator = EnumAttributeValidator.new('String', ["capture", "capture_reversal", "liquidation", "liquidation_reversal", "payout", "payout_reversal", "refund", "refund_reversal", "rounding_adjustment", "transfer", "transferred", "retention", "temporary_retention", "cashout_retention", "cashout_confirmation", "cashout_cancelation", "autofund_capture"])
|
|
298
|
+
return false unless type_validator.valid?(@type)
|
|
299
|
+
return false if @created_at.nil?
|
|
300
|
+
return false if @livemode.nil?
|
|
251
301
|
true
|
|
252
302
|
end
|
|
253
303
|
|
|
@@ -265,22 +315,45 @@ module DigitalFemsa
|
|
|
265
315
|
@currency = currency
|
|
266
316
|
end
|
|
267
317
|
|
|
318
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
319
|
+
# @param [Object] status Object to be assigned
|
|
320
|
+
def status=(status)
|
|
321
|
+
validator = EnumAttributeValidator.new('String', ["unprocessed", "pending", "available", "owing", "paid_out", "on_hold", "retained", "voided"])
|
|
322
|
+
unless validator.valid?(status)
|
|
323
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
324
|
+
end
|
|
325
|
+
@status = status
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
329
|
+
# @param [Object] type Object to be assigned
|
|
330
|
+
def type=(type)
|
|
331
|
+
validator = EnumAttributeValidator.new('String', ["capture", "capture_reversal", "liquidation", "liquidation_reversal", "payout", "payout_reversal", "refund", "refund_reversal", "rounding_adjustment", "transfer", "transferred", "retention", "temporary_retention", "cashout_retention", "cashout_confirmation", "cashout_cancelation", "autofund_capture"])
|
|
332
|
+
unless validator.valid?(type)
|
|
333
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
334
|
+
end
|
|
335
|
+
@type = type
|
|
336
|
+
end
|
|
337
|
+
|
|
268
338
|
# Checks equality by comparing each attribute.
|
|
269
339
|
# @param [Object] Object to be compared
|
|
270
340
|
def ==(o)
|
|
271
341
|
return true if self.equal?(o)
|
|
272
342
|
self.class == o.class &&
|
|
343
|
+
id == o.id &&
|
|
344
|
+
object == o.object &&
|
|
273
345
|
amount == o.amount &&
|
|
274
|
-
charge == o.charge &&
|
|
275
|
-
created_at == o.created_at &&
|
|
276
|
-
currency == o.currency &&
|
|
277
346
|
fee == o.fee &&
|
|
278
|
-
id == o.id &&
|
|
279
|
-
livemode == o.livemode &&
|
|
280
347
|
net == o.net &&
|
|
281
|
-
|
|
348
|
+
currency == o.currency &&
|
|
282
349
|
status == o.status &&
|
|
283
|
-
type == o.type
|
|
350
|
+
type == o.type &&
|
|
351
|
+
created_at == o.created_at &&
|
|
352
|
+
livemode == o.livemode &&
|
|
353
|
+
charge == o.charge &&
|
|
354
|
+
transfer == o.transfer &&
|
|
355
|
+
transferred_at == o.transferred_at &&
|
|
356
|
+
formula == o.formula
|
|
284
357
|
end
|
|
285
358
|
|
|
286
359
|
# @see the `==` method
|
|
@@ -292,7 +365,7 @@ module DigitalFemsa
|
|
|
292
365
|
# Calculates hash code according to all attributes.
|
|
293
366
|
# @return [Integer] Hash code
|
|
294
367
|
def hash
|
|
295
|
-
[amount,
|
|
368
|
+
[id, object, amount, fee, net, currency, status, type, created_at, livemode, charge, transfer, transferred_at, formula].hash
|
|
296
369
|
end
|
|
297
370
|
|
|
298
371
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DigitalFemsa
|
|
17
|
-
# A transfer represents the action of sending an amount to a business bank account including the status, amount and
|
|
17
|
+
# A transfer represents the action of sending an amount to a business bank account including the status, amount and destination used to make the transfer.
|
|
18
18
|
class TransfersResponse
|
|
19
19
|
# Amount in cents of the transfer.
|
|
20
20
|
attr_accessor :amount
|