vng 2.1.0 → 2.2.0

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: '09b4cd00ba4b70329bb9824f7ebcf41d3d97f02e2bc9677a19dd383d3c0de4c3'
4
- data.tar.gz: 0f2624b2c49242c74810bc7149f29bc95d2f1fdf314222f4e357f119b1e7926c
3
+ metadata.gz: 4971f6a848df0d985ca1d1d86b735e80fec57624c2214cddf5c8201cdab96a9a
4
+ data.tar.gz: 6d4402e9d16b3b75fd8bb76da8773121e5c77d009ee234025a95d61af0928870
5
5
  SHA512:
6
- metadata.gz: 38071da71b58c98fe424be4269fc0d101e49c6b388aa1cff971dd5ea1e693abc968f3bc294ef723043a9a35478cd7de150017bc49a3eb339c94ed7275e2cb692
7
- data.tar.gz: 01e5b806637ebcf5b4dfe9b40bffcdb1fc3e9f944732cb99be9ccf0dc0ddbdcdee910020a704d119956168fa87f867ed795cab960b44863b105dec8030a1f0d8
6
+ metadata.gz: 501643766b5bf72d595c0f45ab0b1ec8f0c445660e996ccbc39600b2f6d3ef97d84a8d1acf7f5b7be9db764926f01569bf4a0f0bd8d4faa72799250afbed4174
7
+ data.tar.gz: bcfd00e8cb492e7c62fe48a57c439960218acc580ef7e2fce68786774346dea12ef3c47e6f5f9317f036cd6d6b3391c3abb33d4791c6b2d8517e6539156568a5
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [2.1.0] - 2024-12-8
1
+ ## [2.2.0] - 2025-01-02
2
+
3
+ - Adds Franchise#cell and Franchise#phone
4
+
5
+ ## [2.1.0] - 2024-12-28
2
6
 
3
7
  - Adds Availability.where(zip:)
4
8
 
data/lib/vng/franchise.rb CHANGED
@@ -5,13 +5,15 @@ module Vng
5
5
  class Franchise < Resource
6
6
  PATH = '/api/v1/resources/franchises/'
7
7
 
8
- attr_reader :id, :name, :gmt_offset, :email
8
+ attr_reader :id, :name, :gmt_offset, :email, :phone, :cell
9
9
 
10
- def initialize(id:, name: nil, gmt_offset: nil, email: nil)
10
+ def initialize(id:, name: nil, gmt_offset: nil, email: nil, phone: nil, cell: nil)
11
11
  @id = id
12
12
  @name = name
13
13
  @gmt_offset = gmt_offset
14
14
  @email = email
15
+ @phone = phone
16
+ @cell = cell
15
17
  end
16
18
 
17
19
 
@@ -34,8 +36,11 @@ module Vng
34
36
  }
35
37
 
36
38
  data = request path: PATH, body: body
39
+
37
40
  email = value_for_field data, 9
38
- new id: franchise_id, email: email
41
+ phone = value_for_field data, 18
42
+ cell = value_for_field data, 1001
43
+ new id: franchise_id, email: email, phone: phone, cell: cell
39
44
  end
40
45
 
41
46
  def self.all
@@ -60,6 +60,8 @@ module Vng
60
60
  if @body.key?(:objectID)
61
61
  { "Franchise"=>{ "objectID"=>"2201007" }, "Fields"=>[
62
62
  { "fieldID"=>9, "fieldValue"=>"vng@example.com" },
63
+ { "fieldID"=>18, "fieldValue"=>"3103103100", "optionID"=>0 },
64
+ { "fieldID"=>1001, "fieldValue"=>"3103103100", "optionID"=>0 },
63
65
  ] }
64
66
  else
65
67
  { "Franchises"=>[
data/lib/vng/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vng
2
- VERSION = '2.1.0'
2
+ VERSION = '2.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vng
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-29 00:00:00.000000000 Z
11
+ date: 2025-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov