digital_femsa 1.0.0 → 1.1.1
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/Gemfile +2 -0
- data/Gemfile.lock +104 -0
- data/Makefile +14 -0
- data/README.md +28 -33
- data/VERSION +1 -1
- data/config-ruby.json +1 -1
- data/digital_femsa.gemspec +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 +248 -9
- 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/spec/api/balances_api_spec.rb +24 -22
- data/spec/api/charges_api_spec.rb +92 -49
- data/spec/api/companies_api_spec.rb +57 -35
- data/spec/api/customers_api_spec.rb +115 -99
- data/spec/api/events_api_spec.rb +72 -48
- data/spec/api/generated_apis_coverage_spec.rb +94 -0
- data/spec/api/logs_api_spec.rb +57 -38
- data/spec/api/orders_api_spec.rb +134 -108
- data/spec/api/payment_link_api_spec.rb +91 -81
- data/spec/api/payment_methods_api_spec.rb +102 -65
- data/spec/api/transactions_api_spec.rb +63 -41
- data/spec/api/transfers_api_spec.rb +57 -38
- data/spec/api/webhook_keys_api_spec.rb +87 -68
- data/spec/api/webhooks_api_spec.rb +110 -79
- data/spec/api_client_spec.rb +259 -0
- data/spec/models/generated_models_coverage_spec.rb +152 -0
- data/spec/models/webhook_request_ssrf_protection_spec.rb +275 -0
- data/spec/spec_helper.rb +37 -0
- data/templates/ruby/api_client.mustache +8 -4
- metadata +40 -37
- 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
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
RSpec.describe DigitalFemsa::WebhookRequest, type: :model do
|
|
4
|
+
describe 'SSRF Protection' do
|
|
5
|
+
let(:valid_url) { 'https://example.com/webhook' }
|
|
6
|
+
let(:webhook_request) { DigitalFemsa::WebhookRequest.new(url: valid_url, synchronous: false) }
|
|
7
|
+
|
|
8
|
+
describe '#url=' do
|
|
9
|
+
context 'with valid URLs' do
|
|
10
|
+
it 'allows legitimate external URLs' do
|
|
11
|
+
expect { webhook_request.url = 'https://api.example.com/webhook' }.not_to raise_error
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'allows HTTP URLs' do
|
|
15
|
+
expect { webhook_request.url = 'http://api.example.com/webhook' }.not_to raise_error
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it 'allows URLs with standard ports' do
|
|
19
|
+
expect { webhook_request.url = 'https://example.com:443/webhook' }.not_to raise_error
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'allows URLs with non-standard but safe ports' do
|
|
23
|
+
expect { webhook_request.url = 'https://example.com:9443/webhook' }.not_to raise_error
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
context 'with localhost variations' do
|
|
28
|
+
it 'blocks localhost' do
|
|
29
|
+
expect { webhook_request.url = 'https://localhost/webhook' }
|
|
30
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it 'blocks 127.0.0.1' do
|
|
34
|
+
expect { webhook_request.url = 'https://127.0.0.1/webhook' }
|
|
35
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it 'blocks 127.0.0.0' do
|
|
39
|
+
expect { webhook_request.url = 'https://127.0.0.0/webhook' }
|
|
40
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it 'blocks 0.0.0.0' do
|
|
44
|
+
expect { webhook_request.url = 'https://0.0.0.0/webhook' }
|
|
45
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'blocks IPv6 localhost' do
|
|
49
|
+
expect { webhook_request.url = 'https://::1/webhook' }
|
|
50
|
+
.to raise_error(ArgumentError, /must be a valid URL/)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it 'blocks 127.0.0.2' do
|
|
54
|
+
expect { webhook_request.url = 'https://127.0.0.2/webhook' }
|
|
55
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'blocks 127.1.1.1' do
|
|
59
|
+
expect { webhook_request.url = 'https://127.1.1.1/webhook' }
|
|
60
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
context 'with private IP ranges' do
|
|
65
|
+
it 'blocks 10.x.x.x range' do
|
|
66
|
+
expect { webhook_request.url = 'https://10.0.0.1/webhook' }
|
|
67
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
it 'blocks 192.168.x.x range' do
|
|
71
|
+
expect { webhook_request.url = 'https://192.168.1.1/webhook' }
|
|
72
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
it 'blocks 172.16-31.x.x range' do
|
|
76
|
+
expect { webhook_request.url = 'https://172.16.0.1/webhook' }
|
|
77
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
it 'blocks 172.31.x.x range' do
|
|
81
|
+
expect { webhook_request.url = 'https://172.31.0.1/webhook' }
|
|
82
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
it 'blocks 169.254.x.x range (link-local)' do
|
|
86
|
+
expect { webhook_request.url = 'https://169.254.169.254/webhook' }
|
|
87
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
context 'with internal hostnames' do
|
|
92
|
+
it 'blocks internal hostnames' do
|
|
93
|
+
expect { webhook_request.url = 'https://internal-service/webhook' }
|
|
94
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
it 'blocks database hostnames' do
|
|
98
|
+
expect { webhook_request.url = 'https://database.local/webhook' }
|
|
99
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
it 'blocks admin hostnames' do
|
|
103
|
+
expect { webhook_request.url = 'https://admin-panel/webhook' }
|
|
104
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
it 'blocks api-gateway hostnames' do
|
|
108
|
+
expect { webhook_request.url = 'https://api-gateway.internal/webhook' }
|
|
109
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
context 'with DNS rebinding services' do
|
|
114
|
+
it 'blocks xip.io' do
|
|
115
|
+
expect { webhook_request.url = 'https://127.0.0.1.xip.io/webhook' }
|
|
116
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
it 'blocks nip.io' do
|
|
120
|
+
expect { webhook_request.url = 'https://192.168.1.1.nip.io/webhook' }
|
|
121
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
it 'blocks localtest.me' do
|
|
125
|
+
expect { webhook_request.url = 'https://localtest.me/webhook' }
|
|
126
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
context 'with suspicious hostname patterns' do
|
|
131
|
+
it 'blocks internal- prefix' do
|
|
132
|
+
expect { webhook_request.url = 'https://internal-api/webhook' }
|
|
133
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
it 'blocks dev- prefix' do
|
|
137
|
+
expect { webhook_request.url = 'https://dev-service/webhook' }
|
|
138
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
it 'blocks db- prefix' do
|
|
142
|
+
expect { webhook_request.url = 'https://db-primary/webhook' }
|
|
143
|
+
.to raise_error(ArgumentError, /hostname points to restricted network resource/)
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
context 'with restricted ports' do
|
|
148
|
+
it 'blocks SSH port' do
|
|
149
|
+
expect { webhook_request.url = 'https://example.com:22/webhook' }
|
|
150
|
+
.to raise_error(ArgumentError, /port is not allowed/)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
it 'blocks database ports' do
|
|
154
|
+
expect { webhook_request.url = 'https://example.com:3306/webhook' }
|
|
155
|
+
.to raise_error(ArgumentError, /port is not allowed/)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
it 'blocks Redis port' do
|
|
159
|
+
expect { webhook_request.url = 'https://example.com:6379/webhook' }
|
|
160
|
+
.to raise_error(ArgumentError, /port is not allowed/)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
it 'blocks Elasticsearch port' do
|
|
164
|
+
expect { webhook_request.url = 'https://example.com:9200/webhook' }
|
|
165
|
+
.to raise_error(ArgumentError, /port is not allowed/)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
it 'blocks MongoDB port' do
|
|
169
|
+
expect { webhook_request.url = 'https://example.com:27017/webhook' }
|
|
170
|
+
.to raise_error(ArgumentError, /port is not allowed/)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
it 'allows standard HTTP port' do
|
|
174
|
+
expect { webhook_request.url = 'https://example.com:80/webhook' }.not_to raise_error
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
it 'allows standard HTTPS port' do
|
|
178
|
+
expect { webhook_request.url = 'https://example.com:443/webhook' }.not_to raise_error
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
context 'with invalid schemes' do
|
|
183
|
+
it 'blocks ftp scheme' do
|
|
184
|
+
expect { webhook_request.url = 'ftp://example.com/webhook' }
|
|
185
|
+
.to raise_error(ArgumentError, /must use http or https scheme/)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
it 'blocks file scheme' do
|
|
189
|
+
expect { webhook_request.url = 'file:///etc/passwd' }
|
|
190
|
+
.to raise_error(ArgumentError, /must use http or https scheme/)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
it 'blocks missing scheme' do
|
|
194
|
+
expect { webhook_request.url = '//example.com/webhook' }
|
|
195
|
+
.to raise_error(ArgumentError, /must use http or https scheme/)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
context 'with malformed URLs' do
|
|
200
|
+
it 'blocks invalid URL format' do
|
|
201
|
+
expect { webhook_request.url = 'not-a-url' }
|
|
202
|
+
.to raise_error(ArgumentError, /must use http or https scheme/)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
it 'blocks empty hostname' do
|
|
206
|
+
expect { webhook_request.url = 'https:///webhook' }
|
|
207
|
+
.to raise_error(ArgumentError, /hostname cannot be empty/)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
it 'blocks nil URL' do
|
|
211
|
+
expect { webhook_request.url = nil }
|
|
212
|
+
.to raise_error(ArgumentError, /url cannot be nil/)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
describe '#valid?' do
|
|
218
|
+
it 'returns true for valid URLs' do
|
|
219
|
+
webhook_request.url = 'https://example.com/webhook'
|
|
220
|
+
expect(webhook_request.valid?).to be true
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
it 'returns false for localhost URLs' do
|
|
224
|
+
webhook_request.instance_variable_set(:@url, 'https://localhost/webhook')
|
|
225
|
+
expect(webhook_request.valid?).to be false
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
it 'returns false for private IP URLs' do
|
|
229
|
+
webhook_request.instance_variable_set(:@url, 'https://192.168.1.1/webhook')
|
|
230
|
+
expect(webhook_request.valid?).to be false
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
it 'returns false for restricted ports' do
|
|
234
|
+
webhook_request.instance_variable_set(:@url, 'https://example.com:22/webhook')
|
|
235
|
+
expect(webhook_request.valid?).to be false
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
it 'returns false for invalid schemes' do
|
|
239
|
+
webhook_request.instance_variable_set(:@url, 'ftp://example.com/webhook')
|
|
240
|
+
expect(webhook_request.valid?).to be false
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
describe '#list_invalid_properties' do
|
|
245
|
+
it 'returns empty array for valid URLs' do
|
|
246
|
+
webhook_request.url = 'https://example.com/webhook'
|
|
247
|
+
expect(webhook_request.list_invalid_properties).to be_empty
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
it 'returns error for localhost URLs' do
|
|
251
|
+
webhook_request.instance_variable_set(:@url, 'https://localhost/webhook')
|
|
252
|
+
properties = webhook_request.list_invalid_properties
|
|
253
|
+
expect(properties).to include(/hostname points to restricted network resource/)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
it 'returns error for private IP URLs' do
|
|
257
|
+
webhook_request.instance_variable_set(:@url, 'https://192.168.1.1/webhook')
|
|
258
|
+
properties = webhook_request.list_invalid_properties
|
|
259
|
+
expect(properties).to include(/hostname points to restricted network resource/)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
it 'returns error for restricted ports' do
|
|
263
|
+
webhook_request.instance_variable_set(:@url, 'https://example.com:22/webhook')
|
|
264
|
+
properties = webhook_request.list_invalid_properties
|
|
265
|
+
expect(properties).to include(/port is not allowed/)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
it 'returns error for invalid schemes' do
|
|
269
|
+
webhook_request.instance_variable_set(:@url, 'ftp://example.com/webhook')
|
|
270
|
+
properties = webhook_request.list_invalid_properties
|
|
271
|
+
expect(properties).to include(/must use http or https scheme/)
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -10,6 +10,43 @@ Generator version: 7.5.0
|
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
|
+
# Configure SimpleCov for code coverage
|
|
14
|
+
require 'simplecov'
|
|
15
|
+
require 'simplecov-json'
|
|
16
|
+
|
|
17
|
+
SimpleCov.start do
|
|
18
|
+
# Minimum coverage threshold
|
|
19
|
+
minimum_coverage 80
|
|
20
|
+
|
|
21
|
+
# Track files in the lib directory
|
|
22
|
+
track_files '{lib,app}/**/*.rb'
|
|
23
|
+
|
|
24
|
+
# Exclude certain files from coverage
|
|
25
|
+
add_filter '/spec/'
|
|
26
|
+
add_filter '/vendor/'
|
|
27
|
+
add_filter '/tasks/'
|
|
28
|
+
add_filter '/config/'
|
|
29
|
+
|
|
30
|
+
# Group coverage by file type
|
|
31
|
+
add_group 'Models', 'lib/digital_femsa/models'
|
|
32
|
+
add_group 'APIs', 'lib/digital_femsa/api'
|
|
33
|
+
add_group 'Core', 'lib/digital_femsa.rb'
|
|
34
|
+
add_group 'Configuration', 'lib/digital_femsa/configuration.rb'
|
|
35
|
+
add_group 'API Client', 'lib/digital_femsa/api_client.rb'
|
|
36
|
+
|
|
37
|
+
# Use multiple formatters
|
|
38
|
+
formatters = SimpleCov::Formatter::MultiFormatter.new([
|
|
39
|
+
SimpleCov::Formatter::HTMLFormatter,
|
|
40
|
+
SimpleCov::Formatter::JSONFormatter
|
|
41
|
+
])
|
|
42
|
+
SimpleCov.formatter = formatters
|
|
43
|
+
|
|
44
|
+
# Add custom metrics
|
|
45
|
+
add_filter do |source_file|
|
|
46
|
+
source_file.lines.count < 5 # Exclude very small files
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
13
50
|
# load the gem
|
|
14
51
|
require 'digital_femsa'
|
|
15
52
|
|
|
@@ -39,7 +39,7 @@ module {{moduleName}}
|
|
|
39
39
|
@default_headers = {
|
|
40
40
|
'Content-Type' => 'application/json',
|
|
41
41
|
'User-Agent' => @user_agent,
|
|
42
|
-
'
|
|
42
|
+
'Spin-Client-User-Agent' => digitalfemsa_headers_to_string
|
|
43
43
|
}
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -245,13 +245,17 @@ module {{moduleName}}
|
|
|
245
245
|
end
|
|
246
246
|
def digitalfemsa_headers
|
|
247
247
|
params = {
|
|
248
|
-
|
|
248
|
+
sdk_version: DigitalFemsa::VERSION,
|
|
249
249
|
lang: 'ruby',
|
|
250
|
-
lang_version: RUBY_VERSION
|
|
251
|
-
publisher: 'digitalfemsa'
|
|
250
|
+
lang_version: RUBY_VERSION
|
|
252
251
|
}
|
|
253
252
|
|
|
254
253
|
@digitalfemsa_headers ||= params
|
|
255
254
|
end
|
|
255
|
+
|
|
256
|
+
def digitalfemsa_headers_to_string
|
|
257
|
+
headers = digitalfemsa_headers
|
|
258
|
+
headers.map { |k, v| "#{k}=#{v}" }.join(';')
|
|
259
|
+
end
|
|
256
260
|
end
|
|
257
261
|
end
|
metadata
CHANGED
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: digital_femsa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DigitalFemsa
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.0.1
|
|
20
|
-
- - "<"
|
|
17
|
+
- - '='
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
|
-
version:
|
|
19
|
+
version: 2.14.2
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- -
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: 1.0.1
|
|
30
|
-
- - "<"
|
|
24
|
+
- - '='
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
26
|
+
version: 2.14.2
|
|
33
27
|
- !ruby/object:Gem::Dependency
|
|
34
28
|
name: faraday-multipart
|
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -88,6 +82,7 @@ files:
|
|
|
88
82
|
- CODE_OF_CONDUCT.md
|
|
89
83
|
- CONTRIBUTING.md
|
|
90
84
|
- Gemfile
|
|
85
|
+
- Gemfile.lock
|
|
91
86
|
- LICENSE
|
|
92
87
|
- Makefile
|
|
93
88
|
- README.md
|
|
@@ -105,6 +100,7 @@ files:
|
|
|
105
100
|
- docs/BalanceResponse.md
|
|
106
101
|
- docs/BalancesApi.md
|
|
107
102
|
- docs/ChargeOrderResponse.md
|
|
103
|
+
- docs/ChargeOrderResponseChannel.md
|
|
108
104
|
- docs/ChargeOrderResponsePaymentMethod.md
|
|
109
105
|
- docs/ChargeRequest.md
|
|
110
106
|
- docs/ChargeRequestPaymentMethod.md
|
|
@@ -132,8 +128,6 @@ files:
|
|
|
132
128
|
- docs/CreateCustomerPaymentMethodsResponse.md
|
|
133
129
|
- docs/Customer.md
|
|
134
130
|
- docs/CustomerAddress.md
|
|
135
|
-
- docs/CustomerAntifraudInfo.md
|
|
136
|
-
- docs/CustomerAntifraudInfoResponse.md
|
|
137
131
|
- docs/CustomerFiscalEntitiesDataResponse.md
|
|
138
132
|
- docs/CustomerFiscalEntitiesRequest.md
|
|
139
133
|
- docs/CustomerFiscalEntitiesResponse.md
|
|
@@ -189,12 +183,11 @@ files:
|
|
|
189
183
|
- docs/OrderFiscalEntityAddressResponse.md
|
|
190
184
|
- docs/OrderFiscalEntityRequest.md
|
|
191
185
|
- docs/OrderFiscalEntityResponse.md
|
|
192
|
-
- docs/OrderNextActionResponse.md
|
|
193
|
-
- docs/OrderNextActionResponseRedirectToUrl.md
|
|
194
186
|
- docs/OrderRefundRequest.md
|
|
195
187
|
- docs/OrderRequest.md
|
|
196
188
|
- docs/OrderRequestCustomerInfo.md
|
|
197
189
|
- docs/OrderResponse.md
|
|
190
|
+
- docs/OrderResponseChannel.md
|
|
198
191
|
- docs/OrderResponseCharges.md
|
|
199
192
|
- docs/OrderResponseCheckout.md
|
|
200
193
|
- docs/OrderResponseCustomerInfo.md
|
|
@@ -224,7 +217,6 @@ files:
|
|
|
224
217
|
- docs/ShippingOrderResponse.md
|
|
225
218
|
- docs/ShippingRequest.md
|
|
226
219
|
- docs/ShippingsApi.md
|
|
227
|
-
- docs/SmsCheckoutRequest.md
|
|
228
220
|
- docs/TaxesApi.md
|
|
229
221
|
- docs/TransactionResponse.md
|
|
230
222
|
- docs/TransactionsApi.md
|
|
@@ -234,7 +226,6 @@ files:
|
|
|
234
226
|
- docs/TransfersApi.md
|
|
235
227
|
- docs/TransfersResponse.md
|
|
236
228
|
- docs/UpdateCustomer.md
|
|
237
|
-
- docs/UpdateCustomerAntifraudInfo.md
|
|
238
229
|
- docs/UpdateCustomerFiscalEntitiesResponse.md
|
|
239
230
|
- docs/UpdateCustomerPaymentMethodsResponse.md
|
|
240
231
|
- docs/UpdateOrderDiscountLinesRequest.md
|
|
@@ -285,6 +276,7 @@ files:
|
|
|
285
276
|
- lib/digital_femsa/models/balance_common_field.rb
|
|
286
277
|
- lib/digital_femsa/models/balance_response.rb
|
|
287
278
|
- lib/digital_femsa/models/charge_order_response.rb
|
|
279
|
+
- lib/digital_femsa/models/charge_order_response_channel.rb
|
|
288
280
|
- lib/digital_femsa/models/charge_order_response_payment_method.rb
|
|
289
281
|
- lib/digital_femsa/models/charge_request.rb
|
|
290
282
|
- lib/digital_femsa/models/charge_request_payment_method.rb
|
|
@@ -322,6 +314,7 @@ files:
|
|
|
322
314
|
- lib/digital_femsa/models/customer_payment_methods_data.rb
|
|
323
315
|
- lib/digital_femsa/models/customer_payment_methods_request.rb
|
|
324
316
|
- lib/digital_femsa/models/customer_payment_methods_response.rb
|
|
317
|
+
- lib/digital_femsa/models/customer_payment_sources_inner.rb
|
|
325
318
|
- lib/digital_femsa/models/customer_response.rb
|
|
326
319
|
- lib/digital_femsa/models/customer_response_shipping_contacts.rb
|
|
327
320
|
- lib/digital_femsa/models/customer_shipping_contacts.rb
|
|
@@ -363,12 +356,11 @@ files:
|
|
|
363
356
|
- lib/digital_femsa/models/order_fiscal_entity_address_response.rb
|
|
364
357
|
- lib/digital_femsa/models/order_fiscal_entity_request.rb
|
|
365
358
|
- lib/digital_femsa/models/order_fiscal_entity_response.rb
|
|
366
|
-
- lib/digital_femsa/models/order_next_action_response.rb
|
|
367
|
-
- lib/digital_femsa/models/order_next_action_response_redirect_to_url.rb
|
|
368
359
|
- lib/digital_femsa/models/order_refund_request.rb
|
|
369
360
|
- lib/digital_femsa/models/order_request.rb
|
|
370
361
|
- lib/digital_femsa/models/order_request_customer_info.rb
|
|
371
362
|
- lib/digital_femsa/models/order_response.rb
|
|
363
|
+
- lib/digital_femsa/models/order_response_channel.rb
|
|
372
364
|
- lib/digital_femsa/models/order_response_charges.rb
|
|
373
365
|
- lib/digital_femsa/models/order_response_checkout.rb
|
|
374
366
|
- lib/digital_femsa/models/order_response_customer_info.rb
|
|
@@ -398,6 +390,7 @@ files:
|
|
|
398
390
|
- lib/digital_femsa/models/transfer_method_response.rb
|
|
399
391
|
- lib/digital_femsa/models/transfer_response.rb
|
|
400
392
|
- lib/digital_femsa/models/transfers_response.rb
|
|
393
|
+
- lib/digital_femsa/models/transfers_response_destination.rb
|
|
401
394
|
- lib/digital_femsa/models/update_customer.rb
|
|
402
395
|
- lib/digital_femsa/models/update_customer_antifraud_info.rb
|
|
403
396
|
- lib/digital_femsa/models/update_customer_fiscal_entities_response.rb
|
|
@@ -406,6 +399,8 @@ files:
|
|
|
406
399
|
- lib/digital_femsa/models/update_order_tax_request.rb
|
|
407
400
|
- lib/digital_femsa/models/update_order_tax_response.rb
|
|
408
401
|
- lib/digital_femsa/models/update_payment_methods.rb
|
|
402
|
+
- lib/digital_femsa/models/update_payment_methods_amount.rb
|
|
403
|
+
- lib/digital_femsa/models/update_payment_methods_expires_at.rb
|
|
409
404
|
- lib/digital_femsa/models/update_product.rb
|
|
410
405
|
- lib/digital_femsa/models/webhook_key_create_response.rb
|
|
411
406
|
- lib/digital_femsa/models/webhook_key_delete_response.rb
|
|
@@ -425,6 +420,7 @@ files:
|
|
|
425
420
|
- spec/api/customers_api_spec.rb
|
|
426
421
|
- spec/api/discounts_api_spec.rb
|
|
427
422
|
- spec/api/events_api_spec.rb
|
|
423
|
+
- spec/api/generated_apis_coverage_spec.rb
|
|
428
424
|
- spec/api/logs_api_spec.rb
|
|
429
425
|
- spec/api/orders_api_spec.rb
|
|
430
426
|
- spec/api/payment_link_api_spec.rb
|
|
@@ -437,6 +433,9 @@ files:
|
|
|
437
433
|
- spec/api/transfers_api_spec.rb
|
|
438
434
|
- spec/api/webhook_keys_api_spec.rb
|
|
439
435
|
- spec/api/webhooks_api_spec.rb
|
|
436
|
+
- spec/api_client_spec.rb
|
|
437
|
+
- spec/models/generated_models_coverage_spec.rb
|
|
438
|
+
- spec/models/webhook_request_ssrf_protection_spec.rb
|
|
440
439
|
- spec/spec_helper.rb
|
|
441
440
|
- ssl_data/ca_bundle.crt
|
|
442
441
|
- templates/ruby/CUSTOM_VERSION.mustache
|
|
@@ -446,7 +445,7 @@ homepage: https://www.digitalfemsa.com
|
|
|
446
445
|
licenses:
|
|
447
446
|
- MIT
|
|
448
447
|
metadata: {}
|
|
449
|
-
post_install_message:
|
|
448
|
+
post_install_message:
|
|
450
449
|
rdoc_options: []
|
|
451
450
|
require_paths:
|
|
452
451
|
- lib
|
|
@@ -462,27 +461,31 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
462
461
|
version: '0'
|
|
463
462
|
requirements: []
|
|
464
463
|
rubygems_version: 3.3.27
|
|
465
|
-
signing_key:
|
|
464
|
+
signing_key:
|
|
466
465
|
specification_version: 4
|
|
467
466
|
summary: This library provides https://api.digitalfemsa.io operations
|
|
468
467
|
test_files:
|
|
469
|
-
- spec/api/
|
|
468
|
+
- spec/api/orders_api_spec.rb
|
|
469
|
+
- spec/api/products_api_spec.rb
|
|
470
|
+
- spec/api/generated_apis_coverage_spec.rb
|
|
471
|
+
- spec/api/balances_api_spec.rb
|
|
472
|
+
- spec/api/taxes_api_spec.rb
|
|
473
|
+
- spec/api/webhooks_api_spec.rb
|
|
474
|
+
- spec/api/shipping_contacts_api_spec.rb
|
|
475
|
+
- spec/api/transfers_api_spec.rb
|
|
476
|
+
- spec/api/charges_api_spec.rb
|
|
477
|
+
- spec/api/companies_api_spec.rb
|
|
470
478
|
- spec/api/shippings_api_spec.rb
|
|
479
|
+
- spec/api/customers_api_spec.rb
|
|
480
|
+
- spec/api/discounts_api_spec.rb
|
|
471
481
|
- spec/api/logs_api_spec.rb
|
|
472
|
-
- spec/api/payment_methods_api_spec.rb
|
|
473
|
-
- spec/api/shipping_contacts_api_spec.rb
|
|
474
482
|
- spec/api/transactions_api_spec.rb
|
|
475
|
-
- spec/api/charges_api_spec.rb
|
|
476
|
-
- spec/api/taxes_api_spec.rb
|
|
477
483
|
- spec/api/webhook_keys_api_spec.rb
|
|
478
|
-
- spec/api/discounts_api_spec.rb
|
|
479
|
-
- spec/api/orders_api_spec.rb
|
|
480
|
-
- spec/api/api_keys_api_spec.rb
|
|
481
|
-
- spec/api/events_api_spec.rb
|
|
482
|
-
- spec/api/webhooks_api_spec.rb
|
|
483
|
-
- spec/api/balances_api_spec.rb
|
|
484
484
|
- spec/api/payment_link_api_spec.rb
|
|
485
|
-
- spec/api/
|
|
486
|
-
- spec/api/
|
|
487
|
-
- spec/api/
|
|
485
|
+
- spec/api/events_api_spec.rb
|
|
486
|
+
- spec/api/payment_methods_api_spec.rb
|
|
487
|
+
- spec/api/api_keys_api_spec.rb
|
|
488
|
+
- spec/api_client_spec.rb
|
|
489
|
+
- spec/models/generated_models_coverage_spec.rb
|
|
490
|
+
- spec/models/webhook_request_ssrf_protection_spec.rb
|
|
488
491
|
- spec/spec_helper.rb
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# DigitalFemsa::CustomerAntifraudInfo
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **account_created_at** | **Integer** | | [optional] |
|
|
8
|
-
| **first_paid_at** | **Integer** | | [optional] |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'digital_femsa'
|
|
14
|
-
|
|
15
|
-
instance = DigitalFemsa::CustomerAntifraudInfo.new(
|
|
16
|
-
account_created_at: 1484040996,
|
|
17
|
-
first_paid_at: 1485151007
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# DigitalFemsa::CustomerAntifraudInfoResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **first_paid_at** | **Integer** | | [optional] |
|
|
8
|
-
| **account_created_at** | **Integer** | | [optional] |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'digital_femsa'
|
|
14
|
-
|
|
15
|
-
instance = DigitalFemsa::CustomerAntifraudInfoResponse.new(
|
|
16
|
-
first_paid_at: 1485151007,
|
|
17
|
-
account_created_at: 1484040996
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# DigitalFemsa::OrderNextActionResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **redirect_to_url** | [**OrderNextActionResponseRedirectToUrl**](OrderNextActionResponseRedirectToUrl.md) | | [optional] |
|
|
8
|
-
| **type** | **String** | Indicates the type of action to be taken | [optional] |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'digital_femsa'
|
|
14
|
-
|
|
15
|
-
instance = DigitalFemsa::OrderNextActionResponse.new(
|
|
16
|
-
redirect_to_url: null,
|
|
17
|
-
type: redirect_to_url
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# DigitalFemsa::OrderNextActionResponseRedirectToUrl
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **url** | **String** | pay.femsa.com/{id} Indicates the url of the Femsa component to authenticate the flow through 3DS2. | [optional] |
|
|
8
|
-
| **return_url** | **String** | Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. | [optional] |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'digital_femsa'
|
|
14
|
-
|
|
15
|
-
instance = DigitalFemsa::OrderNextActionResponseRedirectToUrl.new(
|
|
16
|
-
url: https://pay.femsa.com/6fca054a85194c43971ecea35cc519bb,
|
|
17
|
-
return_url: https://my-website.com"
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/SmsCheckoutRequest.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# DigitalFemsa::SmsCheckoutRequest
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phonenumber** | **String** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'digital_femsa'
|
|
13
|
-
|
|
14
|
-
instance = DigitalFemsa::SmsCheckoutRequest.new(
|
|
15
|
-
phonenumber: 5566982090
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# DigitalFemsa::UpdateCustomerAntifraudInfo
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **account_created_at** | **Integer** | | [optional] |
|
|
8
|
-
| **first_paid_at** | **Integer** | | [optional] |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'digital_femsa'
|
|
14
|
-
|
|
15
|
-
instance = DigitalFemsa::UpdateCustomerAntifraudInfo.new(
|
|
16
|
-
account_created_at: 1484040996,
|
|
17
|
-
first_paid_at: 1485151007
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|