recurly 2.19.3 → 2.19.5

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: 73e765e7fb0fa735ee41b355d7e9b0a3fcde3780e573d7638cfaf739fe04ccee
4
- data.tar.gz: a30b8b38329f53e35e2a71ef4a93cec81debe8f13ecdf3479b67909c0f74bc0f
3
+ metadata.gz: a23c382033fbf492c9175a8523147ecd76f81c177e54d5d5c5e72b88e0ce6314
4
+ data.tar.gz: 4c5df1f86a7ac02f1b4ca1dfd03dead40fb94266dbc8fc2a00e10f042dfe2d96
5
5
  SHA512:
6
- metadata.gz: 1eff4bb945aef93f5263efcf0b338396437eb2c7c506ad786cc4d5e690827f81568a307d49943ae5fd32e89c0434d7e7af83e47eefd47182de543a6bc43de90c
7
- data.tar.gz: 4bc5a3f62806f23c889f3c98905d381ec0e22968ec1ff2a687fd34391ab9e80d2f755bde854fd1a41c09f0394a0b31b7b276291d5fc43add0caefe19d1c801dc
6
+ metadata.gz: 796b43f639d6a13a9d6f063f7718fba79488e3f1131c2657ae01534d52205ff36fe24c43908275a2d3741a39a3fd1b4b9becbe06da10d63294859829ee258e62
7
+ data.tar.gz: 3fa5125171b3bf9f5d75315fd4091a930aa532f931d393291ca1d956de6fcb1db28d85a525995885bbe292393d94738f8ec26faf6a45988b9c50911c44a2cc10
data/README.md CHANGED
@@ -14,7 +14,7 @@ Recurly is packaged as a Ruby gem. We recommend you install it with
14
14
  [Bundler](http://gembundler.com/) by adding the following line to your Gemfile:
15
15
 
16
16
  ``` ruby
17
- gem 'recurly', '~> 2.19.3'
17
+ gem 'recurly', '~> 2.19.5'
18
18
  ```
19
19
 
20
20
  Recurly will automatically use [Nokogiri](http://nokogiri.org/) (for a nice
@@ -16,6 +16,8 @@ module Recurly
16
16
  # @return [Account]
17
17
  belongs_to :account
18
18
 
19
+ has_one :gateway_attribute, class_name: :GatewayAttribute, readonly: false
20
+
19
21
  define_attribute_methods %w(
20
22
  uuid
21
23
  first_name
@@ -13,8 +13,22 @@ module Recurly
13
13
  updated_at
14
14
  )
15
15
 
16
- # We do not expose POST or PUT via the v2 API
17
- protected(*%w(save save!))
18
- private_class_method(*%w(create! create))
16
+ def create_external_product_reference(external_product_reference)
17
+ external_product_reference.uri = "#{path}/external_product_references"
18
+ external_product_reference.save!
19
+ external_product_reference
20
+ end
21
+
22
+ def get_external_product_references
23
+ Pager.new(Recurly::ExternalProductReference, uri: "#{path}/external_product_references", parent: self)
24
+ rescue Recurly::API::UnprocessableEntity => e
25
+ raise Invalid, e.message
26
+ end
27
+
28
+ def get_external_product_reference(external_product_reference_uuid)
29
+ ExternalProductReference.from_response API.get("#{path}/external_product_references/#{external_product_reference_uuid}")
30
+ rescue Recurly::API::UnprocessableEntity => e
31
+ raise Invalid, e.message
32
+ end
19
33
  end
20
34
  end
@@ -12,7 +12,7 @@ module Recurly
12
12
  updated_at
13
13
  )
14
14
 
15
- protected(*%w(save save!))
16
- private_class_method(*%w(all first paginate scoped where create create!))
15
+ # ExternalProductReferences are only writeable and readable through {ExternalProduct} instances.
16
+ embedded! true
17
17
  end
18
18
  end
@@ -0,0 +1,10 @@
1
+ module Recurly
2
+ # Additional attributes to pass to the gateway
3
+ class GatewayAttribute < Resource
4
+ belongs_to :billing_info, class_name: :BillingInfo
5
+
6
+ define_attribute_methods %w(
7
+ account_reference,
8
+ )
9
+ end
10
+ end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Version
3
- VERSION = "2.19.3"
3
+ VERSION = "2.19.5"
4
4
 
5
5
  class << self
6
6
  def inspect
data/lib/recurly.rb CHANGED
@@ -5,6 +5,7 @@ module Recurly
5
5
  require 'recurly/api'
6
6
  require 'recurly/resource'
7
7
  require 'recurly/shipping_address'
8
+ require 'recurly/gateway_attribute'
8
9
  require 'recurly/billing_info'
9
10
  require 'recurly/custom_field'
10
11
  require 'recurly/account_acquisition'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.3
4
+ version: 2.19.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-26 00:00:00.000000000 Z
11
+ date: 2023-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -154,6 +154,7 @@ files:
154
154
  - lib/recurly/external_product.rb
155
155
  - lib/recurly/external_product_reference.rb
156
156
  - lib/recurly/external_subscription.rb
157
+ - lib/recurly/gateway_attribute.rb
157
158
  - lib/recurly/gift_card.rb
158
159
  - lib/recurly/helper.rb
159
160
  - lib/recurly/invoice.rb