gmo 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +20 -1
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_deposit_gets_data_about_a_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_gets_data_about_a_mail_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml +38 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml +69 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml +143 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml +108 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml +73 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml +74 -0
- data/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml +36 -0
- data/lib/gmo.rb +6 -1
- data/lib/gmo/const.rb +1159 -1
- data/lib/gmo/errors.rb +20 -2
- data/lib/gmo/remittance_api.rb +329 -0
- data/lib/gmo/shop_and_site_api.rb +73 -0
- data/lib/gmo/shop_api.rb +223 -2
- data/lib/gmo/site_api.rb +64 -0
- data/lib/gmo/version.rb +1 -1
- data/spec/gmo/{error_spec.rb → errors_spec.rb} +11 -2
- data/spec/gmo/remittance_api_spec.rb +504 -0
- data/spec/gmo/shop_and_site_api_spec.rb +74 -0
- data/spec/gmo/shop_api_spec.rb +278 -0
- data/spec/gmo/site_api_spec.rb +84 -1
- data/spec/support/config.example.yml +5 -0
- data/spec/support/config.yml +5 -0
- data/spec/support/config_loader.rb +1 -1
- data/spec/support/vcr.rb +9 -2
- metadata +30 -4
data/spec/support/config.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'yaml'
|
2
|
-
SPEC_CONF = YAML.load_file(File.join(File.dirname(__FILE__), 'config.yml'))
|
2
|
+
SPEC_CONF = YAML.load_file(File.join(File.dirname(__FILE__), 'config.yml'))
|
data/spec/support/vcr.rb
CHANGED
@@ -3,12 +3,19 @@ VCR.configure do |c|
|
|
3
3
|
c.hook_into :webmock
|
4
4
|
c.allow_http_connections_when_no_cassette = true
|
5
5
|
c.default_cassette_options = { :record => :new_episodes }
|
6
|
+
|
7
|
+
# Filter remittance config before others to correctly hide config from vcr cassettes
|
8
|
+
# as its values are bigger in length than others and should completely be replaced with given strings.
|
9
|
+
c.filter_sensitive_data('<REMITTANCE_SHOP_ID>') { SPEC_CONF["remittance"]["shop_id"] }
|
10
|
+
c.filter_sensitive_data('<REMITTANCE_SHOP_PASS>') { SPEC_CONF["remittance"]["shop_pass"] }
|
11
|
+
c.filter_sensitive_data('<REMITTANCE_HOST>') { SPEC_CONF["remittance"]["host"] }
|
12
|
+
|
13
|
+
c.filter_sensitive_data('<HOST>') { SPEC_CONF["host"] }
|
6
14
|
c.filter_sensitive_data('<SHOP_ID>') { SPEC_CONF["shop_id"] }
|
7
|
-
c.filter_sensitive_data('<SHOP_PASS>') { SPEC_CONF["shop_pass"] }
|
8
15
|
c.filter_sensitive_data('<SITE_ID>') { SPEC_CONF["site_id"] }
|
16
|
+
c.filter_sensitive_data('<SHOP_PASS>') { SPEC_CONF["shop_pass"] }
|
9
17
|
c.filter_sensitive_data('<SITE_PASS>') { SPEC_CONF["site_pass"] }
|
10
18
|
c.filter_sensitive_data('<SITE_PASS>') { SPEC_CONF["site_pass"] }
|
11
|
-
c.filter_sensitive_data('<HOST>') { SPEC_CONF["host"] }
|
12
19
|
c.filter_sensitive_data('<TOKEN>') { SPEC_CONF["token"] }
|
13
20
|
c.filter_sensitive_data('<TOKEN_MEMBER_ID>') { SPEC_CONF["token_member_id"] }
|
14
21
|
c.filter_sensitive_data('<ACCESS_ID>') { ACCESS_ID }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuo Kaniwa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -111,34 +111,58 @@ files:
|
|
111
111
|
- README.md
|
112
112
|
- Rakefile
|
113
113
|
- autotest/discover.rb
|
114
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_deposit_gets_data_about_a_deposit.yml
|
115
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml
|
116
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml
|
117
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml
|
118
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_gets_data_about_a_mail_deposit.yml
|
119
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml
|
120
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml
|
121
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml
|
122
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml
|
123
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml
|
124
|
+
- fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml
|
114
125
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_change_order_auth_to_sale.yml
|
115
126
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_gets_data_about_order.yml
|
116
127
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_got_error_if_missing_options.yml
|
128
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml
|
117
129
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_gets_data_about_order.yml
|
118
130
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_got_error_if_missing_options.yml
|
131
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml
|
119
132
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_gets_data_about_a_transaction.yml
|
120
133
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_got_error_if_missing_options.yml
|
121
134
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_gets_data_about_a_transaction.yml
|
122
135
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_got_error_if_missing_options.yml
|
123
136
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_linepay_gets_data_about_a_transaction.yml
|
124
137
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_pay_easy_gets_data_about_a_transaction.yml
|
138
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml
|
139
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml
|
125
140
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_cvs_gets_data_about_a_transaction.yml
|
141
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml
|
126
142
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_gets_data_about_a_transaction.yml
|
127
143
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_got_error_if_missing_options.yml
|
128
144
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_linepay_gets_data_about_a_transaction.yml
|
129
145
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml
|
130
146
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_pay_easy_gets_data_about_a_transaction.yml
|
147
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml
|
148
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml
|
131
149
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_gets_data_about_order.yml
|
132
150
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_got_error_if_missing_options.yml
|
133
151
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_gets_data_about_order.yml
|
134
152
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_got_error_if_missing_options.yml
|
153
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml
|
154
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml
|
155
|
+
- fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml
|
135
156
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_data.yml
|
136
157
|
- fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_error_if_missing_options.yml
|
158
|
+
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml
|
137
159
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_card_gets_data_about_a_card.yml
|
138
160
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_member_gets_data_about_a_member.yml
|
139
161
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_doesn_t_require_card_info_if_token_is_present.yml
|
140
162
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_gets_data_about_a_card.yml
|
141
163
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_member_gets_data_about_a_transaction.yml
|
164
|
+
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml
|
165
|
+
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml
|
142
166
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_gets_data_about_a_card.yml
|
143
167
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_member_gets_data_about_a_member.yml
|
144
168
|
- fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_update_member_gets_data_about_a_transaction.yml
|
@@ -148,14 +172,16 @@ files:
|
|
148
172
|
- lib/gmo/errors.rb
|
149
173
|
- lib/gmo/http_services.rb
|
150
174
|
- lib/gmo/json.rb
|
175
|
+
- lib/gmo/remittance_api.rb
|
151
176
|
- lib/gmo/shop_and_site_api.rb
|
152
177
|
- lib/gmo/shop_api.rb
|
153
178
|
- lib/gmo/site_api.rb
|
154
179
|
- lib/gmo/version.rb
|
155
180
|
- spec/gmo/api_spec.rb
|
156
|
-
- spec/gmo/
|
181
|
+
- spec/gmo/errors_spec.rb
|
157
182
|
- spec/gmo/http_service_spec.rb
|
158
183
|
- spec/gmo/json_spec.rb
|
184
|
+
- spec/gmo/remittance_api_spec.rb
|
159
185
|
- spec/gmo/shop_and_site_api_spec.rb
|
160
186
|
- spec/gmo/shop_api_spec.rb
|
161
187
|
- spec/gmo/site_api_spec.rb
|
@@ -190,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
216
|
version: '0'
|
191
217
|
requirements: []
|
192
218
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.7.4
|
194
220
|
signing_key:
|
195
221
|
specification_version: 4
|
196
222
|
summary: 'GMO Payment API client: Ruby client library for the GMO Payment Platform.'
|