runa-ruby-client 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ac2b547a1b85e1635e6c09b007f2f38cb8495434a61320940871cce787d1c1e
4
- data.tar.gz: 7ab3dd25f6e4fe0d6200660534c82a1567721bf3e8f962c7f0660869e3c10afb
3
+ metadata.gz: 5367c11c00b8b54fa088fbc17169825fc9b33ca251265ae5b5793b0f113ebe42
4
+ data.tar.gz: fb397d978bb48d75510bea9b5603e17f2432afe5cf884a4b45d8919fd87c8ac2
5
5
  SHA512:
6
- metadata.gz: c932a61e08eca8e1c6fbc051698aca60e88d0812e5e4b9f241eaeb02655746a95472c896620b474e80e6e193c2469c8567017a521ba766379a92f7527c00ada0
7
- data.tar.gz: 34a8677a24af1c0d4adaab3b5c8ad9214b2a25ac73d03fa5c0ee8f380fd2e8f3b5ce4caaa6601dfe24cf844766d670fa5a916f7b354bfc8ecb4f866c2f514e1f
6
+ metadata.gz: 4ff382da0d1582524b28e688e80d5656606d321c53c53f1f0d783d9be49b32ef315cdebf6314327de1f277b7efc97a5e0c35ebd2fd9f8e2eeb028a8dcf98e1e6
7
+ data.tar.gz: 1c81d4a81933b7e0c445cc94d1e79da4707b8285228540da46a35ffcc7418b1022659686f9d4c8d898afaacefacefd26952263d0370f143cc63f615cf5012162
@@ -10,7 +10,7 @@ class Runa::Order < Runa::Response
10
10
  attr_accessor :payment_type, :currency, :face_value, :distribution_type, :product_code, :external_ref
11
11
 
12
12
  # response/success
13
- attr_accessor :code, :order_id, :status, :created_at, :payment_method, :currency, :total_price,
13
+ attr_accessor :code, :order_id, :status, :created_at, :payment_method, :currency, :total_price,
14
14
  :total_discount, :items, :redemption_url, :order_id
15
15
 
16
16
  def initialize(params = {})
@@ -69,6 +69,7 @@ class Runa::Order < Runa::Response
69
69
  @status = @payload['status']
70
70
  @total_price = @payload['total_price']
71
71
  @items = @payload['items']
72
+ @redemption_url = @items.first['redemption_url']
72
73
  end
73
74
 
74
75
  @order_id = @payload['id']
@@ -7,15 +7,45 @@ class Runa::Product < Runa::Response
7
7
  attr_accessor :product_code
8
8
 
9
9
  # response/success
10
- attr_accessor :code, :name, :description, :currency, :availability,
11
- :countries_redeemable_in,
10
+ attr_accessor :available_denominations,
11
+ :availability,
12
+ :card_image_url,
12
13
  :categories,
13
- :state,
14
+ :code,
15
+ :content_resources,
16
+ :countries_redeemable_in,
17
+ :currency,
18
+ :denomination_type,
19
+ :description_url,
20
+ :e_code_usage_type,
14
21
  :gift_card,
15
- :subscription
22
+ :name,
23
+ :minimum_value,
24
+ :maximum_value,
25
+ :redeem_instructions_url,
26
+ :state,
27
+ :nonsense,
28
+ :terms_and_conditions_url
16
29
 
17
30
  def initialize(params = {})
18
31
  super
32
+
33
+ unless gift_card.nil?
34
+ denominations = gift_card['denominations']
35
+ @denomination_type = denominations['type']
36
+ @available_denominations = denominations['available_list']
37
+ @minimum_value = denominations['minimum_value']
38
+ @maximum_value = denominations['maximum_value']
39
+ @card_image_url = gift_card['assets']['card_image_url']
40
+ @e_code_usage_type = gift_card['e_code_usage_type']
41
+
42
+ @content_resources = gift_card['content_resources']
43
+ @description_url = @content_resources['description_markdown_url']
44
+ @redeem_instructions_url = @content_resources['redemption_instructions_markdown_url']
45
+ @terms_and_conditions_url = @content_resources['terms_consumer_markdown_url']
46
+ end
47
+
48
+ self
19
49
  end
20
50
 
21
51
  def path
data/lib/runa/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Runa
4
4
  # api-version.lib-build
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.1'
6
6
  end
data/lib/runa.rb CHANGED
@@ -8,7 +8,6 @@ require 'runa/models/response'
8
8
  require 'runa/models/product'
9
9
  require 'runa/models/products'
10
10
  require 'runa/models/order'
11
- require 'runa/models/stock'
12
11
 
13
12
  module Runa
14
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runa-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Oglesby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-06 00:00:00.000000000 Z
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday