ecommerce-client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/README.md +25 -2
- data/ecommerce-client.gemspec +1 -0
- data/lib/ecommerce.rb +5 -0
- data/lib/ecommerce/attribute_handler.rb +1 -1
- data/lib/ecommerce/resources/account_order.rb +26 -0
- data/lib/ecommerce/resources/collection.rb +57 -0
- data/lib/ecommerce/resources/invoice_order.rb +52 -0
- data/lib/ecommerce/resources/invoice_order_collection.rb +20 -0
- data/lib/ecommerce/resources/invoice_plan.rb +27 -0
- data/lib/ecommerce/resources/order.rb +18 -13
- data/lib/ecommerce/resources/order_collection.rb +6 -48
- data/lib/ecommerce/version.rb +1 -1
- data/spec/ecommerce/attribute_handler_spec.rb +24 -0
- data/spec/ecommerce/resources/account_order_spec.rb +24 -0
- data/spec/ecommerce/resources/collection_spec.rb +70 -0
- data/spec/ecommerce/resources/invoice_order_collection_spec.rb +20 -0
- data/spec/ecommerce/resources/invoice_order_spec.rb +54 -0
- data/spec/ecommerce/resources/invoice_plan_spec.rb +23 -0
- data/spec/ecommerce/resources/order_collection_spec.rb +7 -69
- data/spec/ecommerce/resources/order_spec.rb +46 -5
- data/spec/spec_helper.rb +3 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_AccountOrder_find_all_when_not_found_raises_NotFound.yml +219 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_AccountOrder_find_all_when_success_returns_a_find_all_of_orders.yml +297 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_all_when_not_found_raises_NotFound.yml +30 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_all_when_success_returns_a_find_all_of_orders.yml +73 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_when_not_found_raises_NotFound.yml +46 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_when_success_returns_order_object.yml +59 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_InvoicePlan_find_all_when_not_found_raises_NotFound.yml +46 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_InvoicePlan_find_all_when_success_returns_a_find_all_of_orders.yml +63 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_Order_update_when_sending_not_all_required_parameters_raises_error_BarRequ.yml +49 -0
- data/spec/vcr_cassettes/Ecommerce/Resources_Order_update_with_success_returns_order_information_on_body.yml +61 -0
- metadata +52 -3
@@ -0,0 +1,297 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://sandbox.ecommerce.myfreecomm.com.br/api/accounts/e5732007-7989-4372-8e72-9ec8cf6ee046/orders/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"page":1,"limit":20}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Ecommerce Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- Basic cDlhWXNSU0l2TTo0MWUxMzc2OGI0N2Q1NTM0MTdiNDQxYjg2M2Jh
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Allow:
|
24
|
+
- GET, HEAD, OPTIONS
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Cache-Timeout:
|
28
|
+
- "-1"
|
29
|
+
Content-Language:
|
30
|
+
- pt-br
|
31
|
+
Content-Type:
|
32
|
+
- application/json
|
33
|
+
Date:
|
34
|
+
- Tue, 31 Mar 2015 21:35:43 GMT
|
35
|
+
Expires:
|
36
|
+
- Tue, 31 Mar 2015 18:35:43
|
37
|
+
Link:
|
38
|
+
- "<http://sandbox.ecommerce.myfreecomm.com.br/api/accounts/e5732007-7989-4372-8e72-9ec8cf6ee046/orders/?page=2>;
|
39
|
+
rel=next, <http://sandbox.ecommerce.myfreecomm.com.br/api/accounts/e5732007-7989-4372-8e72-9ec8cf6ee046/orders/?page=3>;
|
40
|
+
rel=last, <http://sandbox.ecommerce.myfreecomm.com.br/api/accounts/e5732007-7989-4372-8e72-9ec8cf6ee046/orders/?page=1>;
|
41
|
+
rel=first"
|
42
|
+
Server:
|
43
|
+
- nginx/1.6.2
|
44
|
+
Vary:
|
45
|
+
- Authenticate, Accept, Accept-Language, Cookie
|
46
|
+
transfer-encoding:
|
47
|
+
- chunked
|
48
|
+
Connection:
|
49
|
+
- keep-alive
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: '[{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
53
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2608/change/rexpense-beta/"},
|
54
|
+
"activation_expired": false, "number": 2608, "address_state": "", "global_account":
|
55
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2608/",
|
56
|
+
"is_trial": false, "document_number": "97630527349", "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2608/checkout/",
|
57
|
+
"active_until": null, "charge_day": 25, "address_quarter": null, "activated_at":
|
58
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
59
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
60
|
+
"address_complement": "", "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2608/discounts/",
|
61
|
+
"created_at": "2015-03-25 17:54:42", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2608/adjustments/",
|
62
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
63
|
+
"zip_code": null, "client_name": "Jaime Lannister KingSlayer", "invoices_url":
|
64
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2608/invoices/"},
|
65
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
66
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2610/change/rexpense-beta/"},
|
67
|
+
"activation_expired": false, "number": 2610, "address_state": null, "global_account":
|
68
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2610/",
|
69
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2610/checkout/",
|
70
|
+
"active_until": null, "charge_day": 25, "address_quarter": null, "activated_at":
|
71
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
72
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
73
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2610/discounts/",
|
74
|
+
"created_at": "2015-03-25 17:59:15", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2610/adjustments/",
|
75
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
76
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2610/invoices/"},
|
77
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
78
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2611/change/rexpense-beta/"},
|
79
|
+
"activation_expired": false, "number": 2611, "address_state": null, "global_account":
|
80
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2611/",
|
81
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2611/checkout/",
|
82
|
+
"active_until": null, "charge_day": 25, "address_quarter": null, "activated_at":
|
83
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
84
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
85
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2611/discounts/",
|
86
|
+
"created_at": "2015-03-25 18:03:33", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2611/adjustments/",
|
87
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
88
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2611/invoices/"},
|
89
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
90
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2645/change/rexpense-beta/"},
|
91
|
+
"activation_expired": false, "number": 2645, "address_state": null, "global_account":
|
92
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2645/",
|
93
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2645/checkout/",
|
94
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
95
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
96
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
97
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2645/discounts/",
|
98
|
+
"created_at": "2015-03-30 14:57:19", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2645/adjustments/",
|
99
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
100
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2645/invoices/"},
|
101
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
102
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2646/change/rexpense-beta/"},
|
103
|
+
"activation_expired": false, "number": 2646, "address_state": null, "global_account":
|
104
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2646/",
|
105
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2646/checkout/",
|
106
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
107
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
108
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
109
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2646/discounts/",
|
110
|
+
"created_at": "2015-03-30 14:59:32", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2646/adjustments/",
|
111
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
112
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2646/invoices/"},
|
113
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
114
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2647/change/rexpense-beta/"},
|
115
|
+
"activation_expired": false, "number": 2647, "address_state": null, "global_account":
|
116
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2647/",
|
117
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2647/checkout/",
|
118
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
119
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
120
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
121
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2647/discounts/",
|
122
|
+
"created_at": "2015-03-30 14:59:34", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2647/adjustments/",
|
123
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
124
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2647/invoices/"},
|
125
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
126
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2648/change/rexpense-beta/"},
|
127
|
+
"activation_expired": false, "number": 2648, "address_state": null, "global_account":
|
128
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2648/",
|
129
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2648/checkout/",
|
130
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
131
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
132
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
133
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2648/discounts/",
|
134
|
+
"created_at": "2015-03-30 14:59:36", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2648/adjustments/",
|
135
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
136
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2648/invoices/"},
|
137
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
138
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2649/change/rexpense-beta/"},
|
139
|
+
"activation_expired": false, "number": 2649, "address_state": null, "global_account":
|
140
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2649/",
|
141
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2649/checkout/",
|
142
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
143
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
144
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
145
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2649/discounts/",
|
146
|
+
"created_at": "2015-03-30 14:59:38", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2649/adjustments/",
|
147
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
148
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2649/invoices/"},
|
149
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
150
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2650/change/rexpense-beta/"},
|
151
|
+
"activation_expired": false, "number": 2650, "address_state": null, "global_account":
|
152
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2650/",
|
153
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2650/checkout/",
|
154
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
155
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
156
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
157
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2650/discounts/",
|
158
|
+
"created_at": "2015-03-30 14:59:40", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2650/adjustments/",
|
159
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
160
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2650/invoices/"},
|
161
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
162
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2651/change/rexpense-beta/"},
|
163
|
+
"activation_expired": false, "number": 2651, "address_state": null, "global_account":
|
164
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2651/",
|
165
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2651/checkout/",
|
166
|
+
"active_until": null, "charge_day": 30, "address_quarter": null, "activated_at":
|
167
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
168
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
169
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2651/discounts/",
|
170
|
+
"created_at": "2015-03-30 14:59:42", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2651/adjustments/",
|
171
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
172
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2651/invoices/"},
|
173
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
174
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2653/change/rexpense-beta/"},
|
175
|
+
"activation_expired": false, "number": 2653, "address_state": null, "global_account":
|
176
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2653/",
|
177
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2653/checkout/",
|
178
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
179
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
180
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
181
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2653/discounts/",
|
182
|
+
"created_at": "2015-03-31 15:18:45", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2653/adjustments/",
|
183
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
184
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2653/invoices/"},
|
185
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
186
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2654/change/rexpense-beta/"},
|
187
|
+
"activation_expired": false, "number": 2654, "address_state": null, "global_account":
|
188
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2654/",
|
189
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2654/checkout/",
|
190
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
191
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
192
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
193
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2654/discounts/",
|
194
|
+
"created_at": "2015-03-31 15:20:18", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2654/adjustments/",
|
195
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
196
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2654/invoices/"},
|
197
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
198
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2655/change/rexpense-beta/"},
|
199
|
+
"activation_expired": false, "number": 2655, "address_state": null, "global_account":
|
200
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2655/",
|
201
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2655/checkout/",
|
202
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
203
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
204
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
205
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2655/discounts/",
|
206
|
+
"created_at": "2015-03-31 15:20:21", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2655/adjustments/",
|
207
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
208
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2655/invoices/"},
|
209
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
210
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2656/change/rexpense-beta/"},
|
211
|
+
"activation_expired": false, "number": 2656, "address_state": null, "global_account":
|
212
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2656/",
|
213
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2656/checkout/",
|
214
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
215
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
216
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
217
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2656/discounts/",
|
218
|
+
"created_at": "2015-03-31 15:20:23", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2656/adjustments/",
|
219
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
220
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2656/invoices/"},
|
221
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
222
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2657/change/rexpense-beta/"},
|
223
|
+
"activation_expired": false, "number": 2657, "address_state": "", "global_account":
|
224
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2657/",
|
225
|
+
"is_trial": false, "document_number": "97630527349", "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2657/checkout/",
|
226
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
227
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
228
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
229
|
+
"address_complement": "", "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2657/discounts/",
|
230
|
+
"created_at": "2015-03-31 15:20:26", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2657/adjustments/",
|
231
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
232
|
+
"zip_code": null, "client_name": "Jaime Lannister", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2657/invoices/"},
|
233
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
234
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2658/change/rexpense-beta/"},
|
235
|
+
"activation_expired": false, "number": 2658, "address_state": null, "global_account":
|
236
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2658/",
|
237
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2658/checkout/",
|
238
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
239
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
240
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
241
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2658/discounts/",
|
242
|
+
"created_at": "2015-03-31 15:20:28", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2658/adjustments/",
|
243
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
244
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2658/invoices/"},
|
245
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
246
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2659/change/rexpense-beta/"},
|
247
|
+
"activation_expired": false, "number": 2659, "address_state": null, "global_account":
|
248
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2659/",
|
249
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2659/checkout/",
|
250
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
251
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
252
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
253
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2659/discounts/",
|
254
|
+
"created_at": "2015-03-31 15:20:30", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2659/adjustments/",
|
255
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
256
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2659/invoices/"},
|
257
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
258
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2660/change/rexpense-beta/"},
|
259
|
+
"activation_expired": false, "number": 2660, "address_state": null, "global_account":
|
260
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2660/",
|
261
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2660/checkout/",
|
262
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
263
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
264
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
265
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2660/discounts/",
|
266
|
+
"created_at": "2015-03-31 15:20:32", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2660/adjustments/",
|
267
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
268
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2660/invoices/"},
|
269
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
270
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2661/change/rexpense-beta/"},
|
271
|
+
"activation_expired": false, "number": 2661, "address_state": null, "global_account":
|
272
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2661/",
|
273
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2661/checkout/",
|
274
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
275
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
276
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
277
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2661/discounts/",
|
278
|
+
"created_at": "2015-03-31 15:21:38", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2661/adjustments/",
|
279
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
280
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2661/invoices/"},
|
281
|
+
{"is_paid": false, "address_number": null, "plan_change_urls": {"rexpense-beta":
|
282
|
+
"http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2662/change/rexpense-beta/"},
|
283
|
+
"activation_expired": false, "number": 2662, "address_state": null, "global_account":
|
284
|
+
"e5732007-7989-4372-8e72-9ec8cf6ee046", "api_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2662/",
|
285
|
+
"is_trial": false, "document_number": null, "checkout_url": "http://sandbox.ecommerce.myfreecomm.com.br/rexpense-custom-monthly-brl-5250/2662/checkout/",
|
286
|
+
"active_until": null, "charge_day": 31, "address_quarter": null, "activated_at":
|
287
|
+
null, "is_active": false, "user_code": "", "address": null, "is_recurring":
|
288
|
+
true, "address_city": null, "plan_slug": "rexpense-custom-monthly-brl-5250",
|
289
|
+
"address_complement": null, "discounts_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2662/discounts/",
|
290
|
+
"created_at": "2015-03-31 15:21:40", "adjustments_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2662/adjustments/",
|
291
|
+
"next_payment_at": null, "amount": "52.50", "client_email": "jaime.lannister@mailinator.com",
|
292
|
+
"zip_code": null, "client_name": "", "invoices_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2662/invoices/"}]'
|
293
|
+
http_version: '1.1'
|
294
|
+
adapter_metadata:
|
295
|
+
effective_url: http://sandbox.ecommerce.myfreecomm.com.br/api/accounts/e5732007-7989-4372-8e72-9ec8cf6ee046/orders/
|
296
|
+
recorded_at: Tue, 31 Mar 2015 21:35:45 GMT
|
297
|
+
recorded_with: VCR 2.9.3
|
data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_all_when_not_found_raises_NotFound.yml
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/wrong-slug/2704/invoices/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"page":1,"limit":20}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Ecommerce Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- Basic cDlhWXNSU0l2TTo0MWUxMzc2OGI0N2Q1NTM0MTdiNDQxYjg2M2Jh
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 0
|
21
|
+
message:
|
22
|
+
headers: {}
|
23
|
+
body:
|
24
|
+
encoding: UTF-8
|
25
|
+
string: ''
|
26
|
+
http_version:
|
27
|
+
adapter_metadata:
|
28
|
+
effective_url: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/wrong-slug/2704/invoices/
|
29
|
+
recorded_at: Thu, 02 Apr 2015 19:54:57 GMT
|
30
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"page":1,"limit":20}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Ecommerce Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- Basic cDlhWXNSU0l2TTo0MWUxMzc2OGI0N2Q1NTM0MTdiNDQxYjg2M2Jh
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Allow:
|
24
|
+
- GET, HEAD, OPTIONS
|
25
|
+
Content-Language:
|
26
|
+
- pt-br
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Thu, 02 Apr 2015 19:52:57 GMT
|
31
|
+
ETag:
|
32
|
+
- '"-4242553726325388158"'
|
33
|
+
Link:
|
34
|
+
- "<http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/?page=1>;
|
35
|
+
rel=last, <http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/?page=1>;
|
36
|
+
rel=first"
|
37
|
+
Server:
|
38
|
+
- nginx/1.6.2
|
39
|
+
Vary:
|
40
|
+
- Authenticate, Accept, Accept-Language, Cookie
|
41
|
+
transfer-encoding:
|
42
|
+
- chunked
|
43
|
+
Connection:
|
44
|
+
- keep-alive
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '[{"redeemed_adjustments": [], "order_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/",
|
48
|
+
"url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/2544/",
|
49
|
+
"created_at": "2015-04-02 15:27:55", "activated_at": "2015-04-02 15:28:49",
|
50
|
+
"number": 2544, "user_data": {"address_city": "RJ", "address_complement":
|
51
|
+
"41", "address_number": "41", "address_quarter": "Bla", "client_name": "Teste",
|
52
|
+
"address_state": "RJ", "client_email": "jaime.lannister@mailinator.com", "address":
|
53
|
+
"Rua sem numero", "document_number": "05793832000126", "zip_code": "20231030"},
|
54
|
+
"amount_with_adjustments": "52.00", "amount": "52.00", "paid_at": "2015-04-02
|
55
|
+
15:28:45", "payment_method": "buypage :: visa", "plan_data": {"slug": "rexpense-custom-monthly-brl-5250",
|
56
|
+
"name": "rexpense-custom-monthly-brl-5250", "description": "Rexpense monthly
|
57
|
+
for 5 users (10,50 BRL each)"}, "charge_date": "2015-04-02", "next_payment_date":
|
58
|
+
"2015-05-02"}, {"redeemed_adjustments": [], "order_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/",
|
59
|
+
"url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/2545/",
|
60
|
+
"created_at": "2015-04-02 15:28:49", "activated_at": null, "number": 2545,
|
61
|
+
"user_data": {"address_city": "RJ", "address_complement": "41", "address_number":
|
62
|
+
"41", "address_quarter": "Bla", "client_name": "Teste", "address_state": "RJ",
|
63
|
+
"client_email": "jaime.lannister@mailinator.com", "address": "Rua sem numero",
|
64
|
+
"document_number": "05793832000126", "zip_code": "20231030"}, "amount_with_adjustments":
|
65
|
+
"52.00", "amount": "52.00", "paid_at": null, "payment_method": "buypage ::
|
66
|
+
visa", "plan_data": {"slug": "rexpense-custom-monthly-brl-5250", "name": "rexpense-custom-monthly-brl-5250",
|
67
|
+
"description": "Rexpense monthly for 5 users (10,50 BRL each)"}, "charge_date":
|
68
|
+
"2015-05-02", "next_payment_date": "2015-06-02"}]'
|
69
|
+
http_version: '1.1'
|
70
|
+
adapter_metadata:
|
71
|
+
effective_url: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/
|
72
|
+
recorded_at: Thu, 02 Apr 2015 19:52:57 GMT
|
73
|
+
recorded_with: VCR 2.9.3
|
data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_when_not_found_raises_NotFound.yml
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/wrong-slug/2704/invoices/2544/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Ecommerce Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- Basic cDlhWXNSU0l2TTo0MWUxMzc2OGI0N2Q1NTM0MTdiNDQxYjg2M2Jh
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 404
|
21
|
+
message: NOT FOUND
|
22
|
+
headers:
|
23
|
+
Allow:
|
24
|
+
- GET, HEAD, OPTIONS
|
25
|
+
Content-Language:
|
26
|
+
- pt-br
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Thu, 02 Apr 2015 20:30:10 GMT
|
31
|
+
Server:
|
32
|
+
- nginx/1.6.2
|
33
|
+
Vary:
|
34
|
+
- Authenticate, Accept, Accept-Language, Cookie
|
35
|
+
Content-Length:
|
36
|
+
- '0'
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: ''
|
42
|
+
http_version: '1.1'
|
43
|
+
adapter_metadata:
|
44
|
+
effective_url: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/wrong-slug/2704/invoices/2544/
|
45
|
+
recorded_at: Thu, 02 Apr 2015 20:30:10 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
data/spec/vcr_cassettes/Ecommerce/Resources_InvoiceOrder_find_when_success_returns_order_object.yml
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/2544/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Ecommerce Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Authorization:
|
17
|
+
- Basic cDlhWXNSU0l2TTo0MWUxMzc2OGI0N2Q1NTM0MTdiNDQxYjg2M2Jh
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Allow:
|
24
|
+
- GET, HEAD, OPTIONS
|
25
|
+
Content-Language:
|
26
|
+
- pt-br
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Date:
|
30
|
+
- Thu, 02 Apr 2015 20:10:56 GMT
|
31
|
+
ETag:
|
32
|
+
- '"-4873699536128629823"'
|
33
|
+
Server:
|
34
|
+
- nginx/1.6.2
|
35
|
+
Vary:
|
36
|
+
- Authenticate, Accept, Accept-Language, Cookie
|
37
|
+
Content-Length:
|
38
|
+
- '1005'
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"redeemed_adjustments": [], "order_url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/",
|
44
|
+
"url": "http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/2544/",
|
45
|
+
"created_at": "2015-04-02 15:27:55", "activated_at": "2015-04-02 15:28:49",
|
46
|
+
"number": 2544, "user_data": {"address_city": "RJ", "address_complement":
|
47
|
+
"41", "address_number": "41", "address_quarter": "Bla", "client_name": "Teste",
|
48
|
+
"address_state": "RJ", "client_email": "jaime.lannister@mailinator.com", "address":
|
49
|
+
"Rua sem numero", "document_number": "05793832000126", "zip_code": "20231030"},
|
50
|
+
"amount_with_adjustments": "52.00", "amount": "52.00", "paid_at": "2015-04-02
|
51
|
+
15:28:45", "payment_method": "buypage :: visa", "plan_data": {"slug": "rexpense-custom-monthly-brl-5250",
|
52
|
+
"name": "rexpense-custom-monthly-brl-5250", "description": "Rexpense monthly
|
53
|
+
for 5 users (10,50 BRL each)"}, "charge_date": "2015-04-02", "next_payment_date":
|
54
|
+
"2015-05-02"}'
|
55
|
+
http_version: '1.1'
|
56
|
+
adapter_metadata:
|
57
|
+
effective_url: http://sandbox.ecommerce.myfreecomm.com.br/api/orders/rexpense-custom-monthly-brl-5250/2704/invoices/2544/
|
58
|
+
recorded_at: Thu, 02 Apr 2015 20:10:56 GMT
|
59
|
+
recorded_with: VCR 2.9.3
|