gecko-ruby 0.11.1 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/testing.yml +1 -5
- data/CHANGELOG.md +17 -1
- data/lib/gecko/client.rb +2 -1
- data/lib/gecko/ext/liquid_compat.rb +3 -0
- data/lib/gecko/helpers/association_helper.rb +4 -2
- data/lib/gecko/record/account.rb +1 -0
- data/lib/gecko/record/base_adapter.rb +13 -7
- data/lib/gecko/record/company.rb +1 -0
- data/lib/gecko/record/payment_method.rb +15 -0
- data/lib/gecko/record/purchase_order.rb +3 -3
- data/lib/gecko/version.rb +1 -1
- data/lib/gecko.rb +1 -0
- data/test/fixtures/vcr_cassettes/payment_methods.yml +69 -0
- data/test/fixtures/vcr_cassettes/payment_methods_count.yml +66 -0
- data/test/record/payment_method_adapter_test.rb +16 -0
- data/test/record/payment_method_test.rb +20 -0
- data/test/support/shared_adapter_examples.rb +2 -2
- data/test/test_helper.rb +10 -0
- metadata +12 -4
- data/.github/config/rubocop_linter_action.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '069a7e4b8a02ab0289b0e3e1a605900023f10eec49527357450d1015d60d12e0'
|
4
|
+
data.tar.gz: e5feb98bafcc6779fff79a311417d7066d2ee13b0673bb71b26adfac9b86e2c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6602475856673d6859aa177edf2d0b2841fdabdaebcb03865642f3c69c1522b5b9ca5e385754e38476129d64b8a42e2b8d27c809726e6b68af77c808be55607c
|
7
|
+
data.tar.gz: c7d8508ab889d9cde9f1c5df08c24f53dc9c65099df71a00f5b5096a44683336dfd549bb1dce3bd949696d7bf600b74760b4e61c7c6030acb8d890068e7189f4
|
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
name: Ruby ${{ matrix.ruby }}
|
13
13
|
steps:
|
14
14
|
- uses: actions/checkout@v2
|
15
|
-
- uses:
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
17
17
|
ruby-version: ${{ matrix.ruby }}
|
18
18
|
- name: Run Tests
|
@@ -20,7 +20,3 @@ jobs:
|
|
20
20
|
gem install bundler --no-document
|
21
21
|
bundle install --jobs 4 --retry 3
|
22
22
|
bundle exec rake
|
23
|
-
- name: Rubocop
|
24
|
-
uses: andrewmcodes/rubocop-linter-action@v3.1.0
|
25
|
-
env:
|
26
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 0.12.3 (2021-12-22)
|
2
|
+
- Add `issued_at` to `Gecko::Record::PurchaseOrder`
|
3
|
+
- Make liquid shim work with `Gecko::Record::Variant#locations`
|
4
|
+
|
5
|
+
## 0.12.2 (2020-08-12)
|
6
|
+
- Change authorize url to commerce.intuit.com
|
7
|
+
- Add `payment_due_at` to `Gecko::Record::PurchaseOrder`
|
8
|
+
|
9
|
+
## 0.12.1 (2020-07-20)
|
10
|
+
- Add `Gecko::Record::PaymentMethod` model.
|
11
|
+
|
12
|
+
## 0.12.0 (2020-07-09)
|
13
|
+
- Silence warnings in Ruby 2.7
|
14
|
+
- Ensure response is passed to `ActiveSupport::Notifications` on error
|
15
|
+
- Ensure `adapter.last_response` is set on error response
|
16
|
+
|
1
17
|
## 0.11.1 (2020-04-30)
|
2
18
|
- Fix addresses on Invoice
|
3
19
|
|
@@ -14,7 +30,7 @@
|
|
14
30
|
## 0.9.0 (2019-07-24)
|
15
31
|
- Added an optional `ActiveSupport::LogSubscriber` class for easy logging,
|
16
32
|
can be enabled via `Gecko.enable_logging`.
|
17
|
-
- Added an optional compatibility shim for the Liquid templating language,
|
33
|
+
- Added an optional compatibility shim for the Liquid templating language,
|
18
34
|
can be enabled via `Gecko.install_liquid_shim`.
|
19
35
|
|
20
36
|
## 0.8.0 (2019-07-01)
|
data/lib/gecko/client.rb
CHANGED
@@ -33,6 +33,7 @@ module Gecko
|
|
33
33
|
record :PurchaseOrder
|
34
34
|
record :PurchaseOrderLineItem
|
35
35
|
record :TaxType
|
36
|
+
record :PaymentMethod
|
36
37
|
record :PaymentTerm
|
37
38
|
record :Webhook
|
38
39
|
|
@@ -126,7 +127,7 @@ module Gecko
|
|
126
127
|
def setup_oauth_client(client_id, client_secret, options)
|
127
128
|
defaults = {
|
128
129
|
site: 'https://api.tradegecko.com',
|
129
|
-
authorize_url: 'https://
|
130
|
+
authorize_url: 'https://commerce.intuit.com/oauth/authorize',
|
130
131
|
connection_opts: {
|
131
132
|
headers: self.class.default_headers
|
132
133
|
}
|
@@ -35,6 +35,9 @@ module Gecko
|
|
35
35
|
Gecko::Record::Base.include(LiquidCompatibility)
|
36
36
|
Gecko::Helpers::CollectionProxy.delegate(:to_liquid, to: :@target)
|
37
37
|
|
38
|
+
Gecko::Record::Variant::VariantLocation.include(Gecko::LiquidCompatibility)
|
39
|
+
Gecko::Record::Variant::VariantPrice.include(Gecko::LiquidCompatibility)
|
40
|
+
|
38
41
|
class BaseDecorator < Liquid::Drop
|
39
42
|
def initialize(delegate)
|
40
43
|
raise 'Turtles all the way down' if delegate.is_a?(BaseDecorator)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'active_support/core_ext/module'
|
4
|
+
|
3
5
|
module Gecko
|
4
6
|
module Helpers
|
5
7
|
# Helper for has_many/belongs_to relationships
|
@@ -72,7 +74,7 @@ module Gecko
|
|
72
74
|
[]
|
73
75
|
end
|
74
76
|
|
75
|
-
build_collection_proxy(collection, {
|
77
|
+
build_collection_proxy(collection, **{
|
76
78
|
embedded: options[:embedded],
|
77
79
|
class_name: class_name,
|
78
80
|
association_name: association_name
|
@@ -100,7 +102,7 @@ module Gecko
|
|
100
102
|
#
|
101
103
|
# @api private
|
102
104
|
def build_collection_proxy(target, association_name:, class_name:, embedded:)
|
103
|
-
CollectionProxy.new({
|
105
|
+
CollectionProxy.new(**{
|
104
106
|
parent: self,
|
105
107
|
target: target,
|
106
108
|
embedded: embedded,
|
data/lib/gecko/record/account.rb
CHANGED
@@ -11,6 +11,7 @@ module Gecko
|
|
11
11
|
belongs_to :primary_location, class_name: "Location"
|
12
12
|
belongs_to :primary_billing_location, class_name: "Location"
|
13
13
|
belongs_to :default_currency, class_name: "Currency"
|
14
|
+
belongs_to :default_payment_method, class_name: "PaymentMethod"
|
14
15
|
belongs_to :default_payment_term, class_name: "PaymentTerm"
|
15
16
|
belongs_to :billing_contact, class_name: "User"
|
16
17
|
belongs_to :default_sales_order_tax_type, class_name: "TaxType"
|
@@ -111,7 +111,7 @@ module Gecko
|
|
111
111
|
#
|
112
112
|
# @api public
|
113
113
|
def where(params = {})
|
114
|
-
response =
|
114
|
+
response = request(:get, plural_path, params: params)
|
115
115
|
parsed_response = response.parsed
|
116
116
|
set_pagination(response.headers)
|
117
117
|
parse_records(parsed_response)
|
@@ -203,7 +203,7 @@ module Gecko
|
|
203
203
|
# @api private
|
204
204
|
def fetch(id) # rubocop:disable Metrics/MethodLength
|
205
205
|
verify_id_presence!(id)
|
206
|
-
response =
|
206
|
+
response = request(:get, plural_path + '/' + id.to_s)
|
207
207
|
record_json = extract_record(response.parsed)
|
208
208
|
instantiate_and_register_record(record_json)
|
209
209
|
rescue OAuth2::Error => e
|
@@ -343,7 +343,7 @@ module Gecko
|
|
343
343
|
#
|
344
344
|
# @api private
|
345
345
|
def create_record(record, opts = {})
|
346
|
-
response =
|
346
|
+
response = request(:post, plural_path, {
|
347
347
|
body: record.as_json,
|
348
348
|
raise_errors: false
|
349
349
|
}.merge(headers: headers_from_opts(opts)))
|
@@ -356,7 +356,7 @@ module Gecko
|
|
356
356
|
#
|
357
357
|
# @api private
|
358
358
|
def update_record(record, opts = {})
|
359
|
-
response =
|
359
|
+
response = request(:put, plural_path + "/" + record.id.to_s, {
|
360
360
|
body: record.as_json,
|
361
361
|
raise_errors: false
|
362
362
|
}.merge(headers: headers_from_opts(opts)))
|
@@ -431,18 +431,24 @@ module Gecko
|
|
431
431
|
# @return [OAuth2::Response]
|
432
432
|
#
|
433
433
|
# @api private
|
434
|
-
def request(verb, path, options = {}) # rubocop:disable Metrics/MethodLength
|
434
|
+
def request(verb, path, options = {}) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
435
435
|
ActiveSupport::Notifications.instrument('request.gecko') do |payload|
|
436
436
|
payload[:verb] = verb
|
437
437
|
payload[:params] = options[:params]
|
438
438
|
payload[:body] = options[:body]
|
439
439
|
payload[:model_class] = model_class
|
440
440
|
payload[:request_path] = path
|
441
|
+
|
441
442
|
options[:headers] = options.fetch(:headers, {}).tap do |headers|
|
442
443
|
headers['Content-Type'] = 'application/json'
|
443
444
|
end
|
444
|
-
|
445
|
-
|
445
|
+
|
446
|
+
options[:body] = options[:body].to_json if options[:body]
|
447
|
+
|
448
|
+
@client.access_token.request(verb, path, options.merge(raise_errors: false)).tap do |response|
|
449
|
+
payload[:response] = @last_response = response
|
450
|
+
raise response.error if response.error && options[:raise_errors] != false
|
451
|
+
end
|
446
452
|
end
|
447
453
|
end
|
448
454
|
|
data/lib/gecko/record/company.rb
CHANGED
@@ -7,6 +7,7 @@ module Gecko
|
|
7
7
|
class Company < Base
|
8
8
|
belongs_to :assignee, class_name: "User"
|
9
9
|
belongs_to :default_tax_type, class_name: "TaxType"
|
10
|
+
belongs_to :default_payment_method, class_name: "PaymentMethod"
|
10
11
|
belongs_to :default_payment_term, class_name: "PaymentTerm"
|
11
12
|
belongs_to :default_stock_location, class_name: "Location"
|
12
13
|
# belongs_to :default_price_list, class_name: "PriceList"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'gecko/record/base'
|
4
|
+
|
5
|
+
module Gecko
|
6
|
+
module Record
|
7
|
+
class PaymentMethod < Base
|
8
|
+
attribute :name, String
|
9
|
+
attribute :is_default, Boolean, readonly: true
|
10
|
+
end
|
11
|
+
|
12
|
+
class PaymentMethodAdapter < BaseAdapter
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -20,7 +20,10 @@ module Gecko
|
|
20
20
|
attribute :order_number, String
|
21
21
|
attribute :reference_number, String
|
22
22
|
attribute :email, String
|
23
|
+
|
23
24
|
attribute :due_at, Date
|
25
|
+
attribute :issued_at, Date
|
26
|
+
attribute :payment_due_at, Date
|
24
27
|
attribute :received_at, Date
|
25
28
|
|
26
29
|
attribute :status, String
|
@@ -34,9 +37,6 @@ module Gecko
|
|
34
37
|
attribute :cached_quantity, BigDecimal, readonly: true
|
35
38
|
|
36
39
|
attribute :tags, Array[String]
|
37
|
-
|
38
|
-
# DEPRECATED
|
39
|
-
# attribute :cached_total, BigDecimal, readonly: true
|
40
40
|
end
|
41
41
|
|
42
42
|
class PurchaseOrderAdapter < BaseAdapter
|
data/lib/gecko/version.rb
CHANGED
data/lib/gecko.rb
CHANGED
@@ -32,6 +32,7 @@ require 'gecko/record/user'
|
|
32
32
|
require 'gecko/record/purchase_order'
|
33
33
|
require 'gecko/record/purchase_order_line_item'
|
34
34
|
require 'gecko/record/tax_type'
|
35
|
+
require 'gecko/record/payment_method'
|
35
36
|
require 'gecko/record/payment_term'
|
36
37
|
require 'gecko/record/webhook'
|
37
38
|
|
@@ -0,0 +1,69 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/payment_methods?limit=5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.12.0 OAuth2/1.4.1 Faraday/0.15.4 Ruby/2.5.7
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Bearer <__ACCESS_TOKEN__>
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Download-Options:
|
32
|
+
- noopen
|
33
|
+
X-Permitted-Cross-Domain-Policies:
|
34
|
+
- none
|
35
|
+
Referrer-Policy:
|
36
|
+
- strict-origin-when-cross-origin
|
37
|
+
X-Rate-Limit-Limit:
|
38
|
+
- '300'
|
39
|
+
X-Rate-Limit-Remaining:
|
40
|
+
- '299'
|
41
|
+
X-Rate-Limit-Reset:
|
42
|
+
- '1594871400'
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache, no-store
|
45
|
+
X-Pagination:
|
46
|
+
- '{"total_records":11,"total_pages":3,"first_page":true,"last_page":false,"out_of_bounds":false,"offset":0}'
|
47
|
+
Link:
|
48
|
+
- <http://api.lvh.me:3000/ajax/payment_methods?limit=5&page=2>; rel="next",
|
49
|
+
<http://api.lvh.me:3000/ajax/payment_methods?limit=5&page=3>; rel="last"
|
50
|
+
Content-Type:
|
51
|
+
- application/json; charset=utf-8
|
52
|
+
Etag:
|
53
|
+
- W/"7462907dae56049f84e55abca4a15c5e"
|
54
|
+
X-Request-Id:
|
55
|
+
- ac553ee8-d518-404c-bd7b-215a168d164c
|
56
|
+
X-Runtime:
|
57
|
+
- '0.108324'
|
58
|
+
Connection:
|
59
|
+
- close
|
60
|
+
Server:
|
61
|
+
- thin
|
62
|
+
body:
|
63
|
+
encoding: UTF-8
|
64
|
+
string: '{"payment_methods":[{"id":32,"created_at":"2020-07-16T03:46:03.946Z","updated_at":"2020-07-16T03:46:03.946Z","name":"PayNow","is_default":false},{"id":31,"created_at":"2020-07-16T03:45:50.096Z","updated_at":"2020-07-16T03:45:50.096Z","name":"Singtel
|
65
|
+
Dash","is_default":false},{"id":30,"created_at":"2020-07-16T03:45:36.276Z","updated_at":"2020-07-16T03:45:36.276Z","name":"eNets","is_default":false},{"id":29,"created_at":"2020-07-16T03:45:21.473Z","updated_at":"2020-07-16T03:45:21.473Z","name":"Voucher","is_default":false},{"id":28,"created_at":"2020-07-16T03:45:15.160Z","updated_at":"2020-07-16T03:45:15.160Z","name":"Credit
|
66
|
+
Note","is_default":false}]}'
|
67
|
+
http_version: null
|
68
|
+
recorded_at: Thu, 16 Jul 2020 03:48:15 GMT
|
69
|
+
recorded_with: VCR 5.1.0
|
@@ -0,0 +1,66 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/payment_methods?limit=0
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.12.0 OAuth2/1.4.1 Faraday/0.15.4 Ruby/2.5.7
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Bearer <__ACCESS_TOKEN__>
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Download-Options:
|
32
|
+
- noopen
|
33
|
+
X-Permitted-Cross-Domain-Policies:
|
34
|
+
- none
|
35
|
+
Referrer-Policy:
|
36
|
+
- strict-origin-when-cross-origin
|
37
|
+
X-Rate-Limit-Limit:
|
38
|
+
- '300'
|
39
|
+
X-Rate-Limit-Remaining:
|
40
|
+
- '299'
|
41
|
+
X-Rate-Limit-Reset:
|
42
|
+
- '1594871400'
|
43
|
+
Cache-Control:
|
44
|
+
- no-cache, no-store
|
45
|
+
X-Pagination:
|
46
|
+
- '{"total_records":11,"total_pages":1,"first_page":true,"last_page":true,"out_of_bounds":false,"offset":0}'
|
47
|
+
Link:
|
48
|
+
- <http://api.lvh.me:3000/ajax/payment_methods?limit=0&page=1>; rel="last"
|
49
|
+
Content-Type:
|
50
|
+
- application/json; charset=utf-8
|
51
|
+
Etag:
|
52
|
+
- W/"98c458ef2a733afd7d9fbf88e776e5c2"
|
53
|
+
X-Request-Id:
|
54
|
+
- 89f1b27c-35d7-4b3c-a356-d87c0a1d4cc1
|
55
|
+
X-Runtime:
|
56
|
+
- '0.160860'
|
57
|
+
Connection:
|
58
|
+
- close
|
59
|
+
Server:
|
60
|
+
- thin
|
61
|
+
body:
|
62
|
+
encoding: UTF-8
|
63
|
+
string: '{"payment_methods":[]}'
|
64
|
+
http_version: null
|
65
|
+
recorded_at: Thu, 16 Jul 2020 03:48:14 GMT
|
66
|
+
recorded_with: VCR 5.1.0
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class Gecko::Record::PaymentMethodAdapterTest < Minitest::Test
|
6
|
+
include TestingAdapter
|
7
|
+
include SharedAdapterExamples
|
8
|
+
|
9
|
+
let(:adapter) { @client.PaymentMethod }
|
10
|
+
let(:plural_name) { "payment_methods" }
|
11
|
+
let(:record_class) { Gecko::Record::PaymentMethod }
|
12
|
+
|
13
|
+
def test_initializes_adapter
|
14
|
+
assert_instance_of(Gecko::Record::PaymentMethodAdapter, @client.PaymentMethod)
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
class Gecko::PaymentMethodTest < Minitest::Test
|
6
|
+
include VCRHelper
|
7
|
+
include SharedRecordExamples
|
8
|
+
|
9
|
+
let(:plural_name) { "payment_methods" }
|
10
|
+
let(:record_class) { Gecko::Record::PaymentMethod }
|
11
|
+
|
12
|
+
def setup
|
13
|
+
@json = load_vcr_hash("payment_methods", "payment_methods").first
|
14
|
+
@record = record_class.new(client, @json)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_initializes_record
|
18
|
+
assert_instance_of(Gecko::Record::PaymentMethod, @record)
|
19
|
+
end
|
20
|
+
end
|
@@ -147,7 +147,7 @@ module SharedAdapterExamples # rubocop:disable Metrics/ModuleLength
|
|
147
147
|
def test_saving_record_with_idempotency_key # rubocop:disable Metrics/MethodLength
|
148
148
|
record = adapter.build
|
149
149
|
mock_token = mock
|
150
|
-
mock_response = mock(status: 200, parsed: { plural_name.singularize => { id: 123 } })
|
150
|
+
mock_response = mock(status: 200, parsed: { plural_name.singularize => { id: 123 } }, error: nil)
|
151
151
|
mock_token.expects(:request)
|
152
152
|
.with(:post, plural_name, {
|
153
153
|
body: record.as_json.to_json,
|
@@ -165,7 +165,7 @@ private
|
|
165
165
|
|
166
166
|
def mock_api_request(record, request, response)
|
167
167
|
mock_token = mock
|
168
|
-
mock_response = mock(status: response[0], parsed: response[1])
|
168
|
+
mock_response = mock(status: response[0], parsed: response[1], error: nil)
|
169
169
|
mock_token.expects(:request)
|
170
170
|
.with(request[0], request[1], {
|
171
171
|
body: record.as_json.to_json,
|
data/test/test_helper.rb
CHANGED
@@ -15,9 +15,19 @@ require 'support/shared_sideloaded_data_parsing_examples'
|
|
15
15
|
require 'support/testing_adapter'
|
16
16
|
require 'support/vcr_support'
|
17
17
|
|
18
|
+
ENV_SECRETS = %w[
|
19
|
+
OAUTH_ID
|
20
|
+
OAUTH_SECRET
|
21
|
+
ACCESS_TOKEN
|
22
|
+
REFRESH_TOKEN
|
23
|
+
].freeze
|
24
|
+
|
18
25
|
VCR.configure do |c|
|
19
26
|
c.cassette_library_dir = 'test/fixtures/vcr_cassettes'
|
20
27
|
c.hook_into :webmock
|
28
|
+
ENV_SECRETS.each do |variable|
|
29
|
+
c.filter_sensitive_data("<__#{variable}__>") { ENV[variable] }
|
30
|
+
end
|
21
31
|
end
|
22
32
|
|
23
33
|
class Minitest::Test
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gecko-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bradley Priest
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -199,7 +199,6 @@ executables: []
|
|
199
199
|
extensions: []
|
200
200
|
extra_rdoc_files: []
|
201
201
|
files:
|
202
|
-
- ".github/config/rubocop_linter_action.yml"
|
203
202
|
- ".github/workflows/testing.yml"
|
204
203
|
- ".gitignore"
|
205
204
|
- ".hound.yml"
|
@@ -239,6 +238,7 @@ files:
|
|
239
238
|
- lib/gecko/record/note.rb
|
240
239
|
- lib/gecko/record/order.rb
|
241
240
|
- lib/gecko/record/order_line_item.rb
|
241
|
+
- lib/gecko/record/payment_method.rb
|
242
242
|
- lib/gecko/record/payment_term.rb
|
243
243
|
- lib/gecko/record/product.rb
|
244
244
|
- lib/gecko/record/purchase_order.rb
|
@@ -275,6 +275,8 @@ files:
|
|
275
275
|
- test/fixtures/vcr_cassettes/order_line_items_specific_count.yml
|
276
276
|
- test/fixtures/vcr_cassettes/orders.yml
|
277
277
|
- test/fixtures/vcr_cassettes/orders_count.yml
|
278
|
+
- test/fixtures/vcr_cassettes/payment_methods.yml
|
279
|
+
- test/fixtures/vcr_cassettes/payment_methods_count.yml
|
278
280
|
- test/fixtures/vcr_cassettes/payment_terms.yml
|
279
281
|
- test/fixtures/vcr_cassettes/payment_terms_count.yml
|
280
282
|
- test/fixtures/vcr_cassettes/products.yml
|
@@ -325,6 +327,8 @@ files:
|
|
325
327
|
- test/record/order_line_item_adapter_test.rb
|
326
328
|
- test/record/order_line_item_test.rb
|
327
329
|
- test/record/order_test.rb
|
330
|
+
- test/record/payment_method_adapter_test.rb
|
331
|
+
- test/record/payment_method_test.rb
|
328
332
|
- test/record/payment_term_adapter_test.rb
|
329
333
|
- test/record/payment_term_test.rb
|
330
334
|
- test/record/product_adapter_test.rb
|
@@ -366,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
370
|
- !ruby/object:Gem::Version
|
367
371
|
version: '0'
|
368
372
|
requirements: []
|
369
|
-
rubygems_version: 3.1.
|
373
|
+
rubygems_version: 3.1.6
|
370
374
|
signing_key:
|
371
375
|
specification_version: 4
|
372
376
|
summary: A Ruby interface to the TradeGecko API.
|
@@ -398,6 +402,8 @@ test_files:
|
|
398
402
|
- test/fixtures/vcr_cassettes/order_line_items_specific_count.yml
|
399
403
|
- test/fixtures/vcr_cassettes/orders.yml
|
400
404
|
- test/fixtures/vcr_cassettes/orders_count.yml
|
405
|
+
- test/fixtures/vcr_cassettes/payment_methods.yml
|
406
|
+
- test/fixtures/vcr_cassettes/payment_methods_count.yml
|
401
407
|
- test/fixtures/vcr_cassettes/payment_terms.yml
|
402
408
|
- test/fixtures/vcr_cassettes/payment_terms_count.yml
|
403
409
|
- test/fixtures/vcr_cassettes/products.yml
|
@@ -448,6 +454,8 @@ test_files:
|
|
448
454
|
- test/record/order_line_item_adapter_test.rb
|
449
455
|
- test/record/order_line_item_test.rb
|
450
456
|
- test/record/order_test.rb
|
457
|
+
- test/record/payment_method_adapter_test.rb
|
458
|
+
- test/record/payment_method_test.rb
|
451
459
|
- test/record/payment_term_adapter_test.rb
|
452
460
|
- test/record/payment_term_test.rb
|
453
461
|
- test/record/product_adapter_test.rb
|