chartmogul-ruby 1.6.9 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ccdde5cd9dff8b595a862fd237b4b0f0ca81ffd8405e9a01fdd3eef77b2ff51
4
- data.tar.gz: cadfd9cb4e927740601e58c2a4dfd308de35214613ecb6549125156ac7a16e8f
3
+ metadata.gz: 121298d0201238ec46cdc41e17f1ac76712b8f11a5e3b5dc584d2e87ab0eebbd
4
+ data.tar.gz: 2f14880133e609cd07c8ffa42cbc792e5bdd969adbb72eb0fd185fc157f670ef
5
5
  SHA512:
6
- metadata.gz: 8c668b97986f2e434d55e3d169954454b981664b911a39bc58acd79cc1b5b37b1c06a778c67f68e58d5ee81bb02f0bb1f6f88f8ca064cf297998627e46945683
7
- data.tar.gz: dd1c661f2a60eb8cd4e2196eee28893ee4e7db627da6aec3f3f1f8c3ce8ba68e04333365186144048ecb6ad6d31c9a33b479d88409969bd922194bf9aae244b8
6
+ metadata.gz: 19d2d3f23a6388c7c466a54102d3187abe88f63b2e543080288c28a9b66aaa2ae97ee6fc5a348dd56b392c424fe8e634d577098ccf32af509c1e43378c2af210
7
+ data.tar.gz: 71cd95d2dd035e73923b44d5c09d1650367c16e1feb6edd217ad962ba6b3772819d5f0798b908d6e37793679572875ab6c802123bbce7a8360c010d99a1624f4
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.chartmogul.com/v1/account
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.0.1
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic hidden
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ server:
22
+ - nginx/1.10.1
23
+ date:
24
+ - Wed, 03 Mar 2021 14:09:59 GMT
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ transfer-encoding:
28
+ - chunked
29
+ connection:
30
+ - keep-alive
31
+ vary:
32
+ - Accept-Encoding, Accept-Encoding
33
+ status:
34
+ - 200 OK
35
+ x-frame-options:
36
+ - SAMEORIGIN
37
+ x-xss-protection:
38
+ - 1; mode=block
39
+ x-content-type-options:
40
+ - nosniff
41
+ x-download-options:
42
+ - noopen
43
+ x-permitted-cross-domain-policies:
44
+ - none
45
+ referrer-policy:
46
+ - strict-origin-when-cross-origin
47
+ etag:
48
+ - W/"40c9400b568f357a5ea27c39820ee12c"
49
+ cache-control:
50
+ - max-age=0, private, must-revalidate
51
+ x-request-id:
52
+ - 40488095-438b-443f-bbce-a5f2c9dc3a07
53
+ x-protected-by:
54
+ - Sqreen
55
+ x-runtime:
56
+ - '0.047066'
57
+ strict-transport-security:
58
+ - max-age=15768000
59
+ body:
60
+ encoding: ASCII-8BIT
61
+ string: '{"name":"Example Test Company","currency":"EUR","time_zone":"Europe/Berlin","week_start_on":"sunday"}'
62
+ http_version:
63
+ recorded_at: Wed, 03 Mar 2021 14:09:59 GMT
64
+ recorded_with: VCR 5.1.0
data/lib/chartmogul.rb CHANGED
@@ -53,6 +53,7 @@ require 'chartmogul/ping'
53
53
  require 'chartmogul/plan'
54
54
  require 'chartmogul/plan_group'
55
55
  require 'chartmogul/plan_groups/plans'
56
+ require 'chartmogul/account'
56
57
 
57
58
  require 'chartmogul/metrics/arpa'
58
59
  require 'chartmogul/metrics/arr'
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ChartMogul
4
+ class Account < APIResource
5
+ set_resource_name 'Account'
6
+ set_resource_path '/v1/account'
7
+
8
+ readonly_attr :name
9
+ readonly_attr :currency
10
+ readonly_attr :time_zone
11
+ readonly_attr :week_start_on
12
+
13
+ include API::Actions::Custom
14
+
15
+ def self.retrieve
16
+ custom!(:get, '/v1/account')
17
+ end
18
+ end
19
+ end
@@ -12,7 +12,7 @@ module ChartMogul
12
12
  writeable_attr :date, type: :time
13
13
  writeable_attr :result
14
14
  writeable_attr :external_id
15
-
15
+ writeable_attr :amount_in_cents
16
16
  writeable_attr :invoice_uuid
17
17
 
18
18
  def initialize(attributes = {})
@@ -12,7 +12,7 @@ module ChartMogul
12
12
  writeable_attr :date, type: :time
13
13
  writeable_attr :result
14
14
  writeable_attr :external_id
15
-
15
+ writeable_attr :amount_in_cents
16
16
  writeable_attr :invoice_uuid
17
17
 
18
18
  def initialize(attributes = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChartMogul
4
- VERSION = '1.6.9'
4
+ VERSION = '1.7.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chartmogul-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.9
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Kopac
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-17 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -184,6 +184,7 @@ files:
184
184
  - chartmogul-ruby.gemspec
185
185
  - fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_in_a_threaded_environment.yml
186
186
  - fixtures/vcr_cassettes/ChartMogul_APIResource/connection/works_when_credentials_are_updated.yml
187
+ - fixtures/vcr_cassettes/ChartMogul_Account/returns_details_of_current_account.yml
187
188
  - fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_custom_attributes.yml
188
189
  - fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/adds_required_tags.yml
189
190
  - fixtures/vcr_cassettes/ChartMogul_Customer/API_Interactions/can_page_through_search_endpoint.yml
@@ -262,6 +263,7 @@ files:
262
263
  - fixtures/vcr_cassettes/ChartMogul_Subscription/_update_cancellation_dates/when_array_is_empty/makes_an_API_call_and_removes_the_cancellation_dates.yml
263
264
  - fixtures/vcr_cassettes/ChartMogul_Transactions_Payment/API_Interactions/correctly_interracts_with_the_API.yml
264
265
  - lib/chartmogul.rb
266
+ - lib/chartmogul/account.rb
265
267
  - lib/chartmogul/api/actions/all.rb
266
268
  - lib/chartmogul/api/actions/create.rb
267
269
  - lib/chartmogul/api/actions/custom.rb
@@ -335,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
337
  - !ruby/object:Gem::Version
336
338
  version: '0'
337
339
  requirements: []
338
- rubygems_version: 3.0.8
340
+ rubygems_version: 3.1.4
339
341
  signing_key:
340
342
  specification_version: 4
341
343
  summary: Chartmogul API Ruby Client