tango-api-client 0.1.0 → 0.1.2

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: becdf70f2093e91de7a7e7e1fbfd2c5dadbed25dffb8af5e00d330f4bdeebc3c
4
- data.tar.gz: a0175048faf72fef7d89acf67e1fdf2d7649bff9a985d57ca88520e3e3f87c41
3
+ metadata.gz: 88450e3c1efb08e7e580777f396ba0204c799c2085f00c9fa0aaa3e8bb88ba3b
4
+ data.tar.gz: 3f293079d5ca3722ef14c6a25a605e86abfe3e69ca42618e7ee0ab94900c41e3
5
5
  SHA512:
6
- metadata.gz: 8f09484e472d1ec10e64019d00def0eed0821a4786b7fe11305ee7bcb1fcf5cae8d5a0f0521812176c1ff0a65b43cef25bec7afd6bec87a85d3b1fc4fd6a1f88
7
- data.tar.gz: a2ed02aeec6a39e94a7be633e194a901c79d09eca09f253a3372b62a2b6792dc3513975bde325cf0fa189e667e7e88840df22edfab95c154e58ed48825b191ba
6
+ metadata.gz: 58cf36892477434d0e0aad46e2e89dfe82cd87e450d6644693d2f710f4117670c9d995297c0a0589ba605dc479458123943911bd12491cfd308a3d9ed1b30d7f
7
+ data.tar.gz: 1d183742be3c3599f7df9e7fa5000e65f6f260ad99cd1e5bb77d8335ac2d862b75019bad430ee96d0efcdd459865056ebbc7791133d1a86b9891f9acc4d4e939
data/CHANGELOG.md CHANGED
@@ -2,10 +2,28 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+ - Nothing yet.
7
+
8
+ ## [0.1.2] - 2025-11-12
9
+ - Add Brand Categories resource: `get` method for `/brandCategories` endpoint
10
+
11
+ ## [0.1.1] - 2025-11-12
12
+ - (Version already published)
13
+
5
14
  ## [0.1.0] - 2025-11-07
6
15
  - Initial release
7
16
  - Basic and OAuth2 auth strategies
8
- - Catalogs#get, Orders#create, Accounts#get, Funds (register/unregister/add), Customers#create, Accounts#create
9
- - Faraday-based client with retries/timeouts
10
- - Structured error mapping
17
+ - Faraday-based client with retries/timeouts and structured error mapping
11
18
  - README and RSpec scaffolding
19
+ - Resources and capabilities:
20
+ - Catalogs: `get` and convenience filters (`get_by_brand_key`, `get_by_brand_name`, `get_by_utid`, `get_by_reward_name`)
21
+ - Orders: `create`, `get`, `list`, `resend` (supports `Idempotency-Key`)
22
+ - Accounts: `get`, `list_for_customer`, `create`, `update_under_customer`
23
+ - Low balance alerts under accounts: list/create/get/update/delete
24
+ - Customers: `list`, `get`, `create`, `accounts`
25
+ - Choice Products: `get`, `get_for_utid`, `catalog`
26
+ - Exchange Rates: `get`, `get_for_utid`
27
+ - Status: `get`
28
+ - Base helpers: `patch_json`, `delete_json`
29
+ - Smoke script expanded; RuboCop clean
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,58 @@
1
+ ## Contributing to tango-api-client
2
+
3
+ Thanks for helping improve this gem! This guide explains how to set up your environment, run tests, lint the code, and propose changes.
4
+
5
+ ### Prerequisites
6
+ - Ruby 3.0+ (tested on 3.0–3.3)
7
+ - Bundler
8
+
9
+ ### Setup
10
+ ```bash
11
+ git clone https://github.com/Engagedly-Inc/tango-api-client.git
12
+ cd tango-api-client
13
+ bin/setup
14
+ ```
15
+
16
+ ### Running the test suite and linters
17
+ ```bash
18
+ bundle exec rake spec
19
+ bundle exec rubocop
20
+ ```
21
+
22
+ Optional: run the smoke script (read the file for env vars and opt-ins)
23
+ ```bash
24
+ ruby bin/smoke
25
+ ```
26
+
27
+ ### Development workflow
28
+ 1. Create a branch from `master`.
29
+ 2. Make focused changes (with tests where applicable).
30
+ 3. Ensure `rake spec` and `rubocop` pass locally.
31
+ 4. Update `README.md` or `CHANGELOG.md` if behavior changes or new endpoints are added.
32
+ 5. Open a pull request describing:
33
+ - What changed and why
34
+ - Any breaking changes
35
+ - How to test/verify
36
+
37
+ ### Versioning and releases
38
+ - Maintainers bump the version in `lib/tango/api/client/version.rb` and update `CHANGELOG.md`.
39
+ - Releasing is done via:
40
+ ```bash
41
+ bundle exec rake release
42
+ ```
43
+ This tags the repo and pushes the gem to RubyGems (requires RubyGems API key and MFA).
44
+
45
+ ### Code style
46
+ - Ruby style is enforced with RuboCop (see `.rubocop.yml`).
47
+ - Prefer small, composable methods and clear names.
48
+ - Avoid duplicating API validations; rely on server responses unless a simple presence check clearly improves developer experience.
49
+
50
+ ### Security
51
+ - Do not include secrets or tokens in commits, logs, or examples.
52
+ - Report security issues privately via GitHub Security Advisories.
53
+
54
+ ### Questions and support
55
+ - Open a “Question” issue if something is unclear.
56
+ - PRs are welcome—thanks for contributing!
57
+
58
+
data/README.md CHANGED
@@ -122,6 +122,7 @@ client.orders.resend('ORDER-123', idempotency_key: idempotency)
122
122
  | Resource | Class | Methods (args) | HTTP / Path |
123
123
  |-----------|-----------------------------------|----------------------------------------------------------------------------------------|----------------------------------------------------|
124
124
  | Catalogs | `Tango::Api::Resources::Catalogs` | `get(params = {})` | GET `/catalogs` |
125
+ | Brand Categories | `Tango::Api::Resources::BrandCategories` | `get` | GET `/brandCategories` |
125
126
  | Orders | `Tango::Api::Resources::Orders` | `create(body)`, `get(order_id)`, `list(params = {})`, `resend(order_id)` | POST `/orders`; GET `/orders/{id}`; GET `/orders`; POST `/orders/{id}/resend` |
126
127
  | Accounts | `Tango::Api::Resources::Accounts` | `get(account_identifier)`, `list_for_customer(customer_identifier, params)`, `create(customer_identifier, body)`, `update_under_customer(customer_identifier, account_identifier, body)`, low balance alerts: `list_low_balance_alerts`, `set_low_balance_alert`, `get_low_balance_alert`, `update_low_balance_alert`, `delete_low_balance_alert` | GET `/accounts/{accountIdentifier}`; GET/POST/PATCH/DELETE under `/customers/{customerIdentifier}/accounts/...` |
127
128
  | Customers | `Tango::Api::Resources::Customers`| `list(params = {})`, `get(customer_identifier)`, `create(body)`, `accounts(customer_identifier, params)` | GET `/customers`; GET `/customers/{customerIdentifier}`; POST `/customers`; GET `/customers/{customerIdentifier}/accounts` |
@@ -3,7 +3,7 @@
3
3
  module Tango
4
4
  module Api
5
5
  class Client
6
- VERSION = "0.1.0"
6
+ VERSION = "0.1.2"
7
7
  end
8
8
  end
9
9
  end
@@ -19,6 +19,7 @@ require_relative "resources/customers"
19
19
  require_relative "resources/status"
20
20
  require_relative "resources/exchange_rates"
21
21
  require_relative "resources/choice_products"
22
+ require_relative "resources/brand_categories"
22
23
 
23
24
  module Tango
24
25
  module Api
@@ -78,6 +79,10 @@ module Tango
78
79
  Resources::ChoiceProducts.new(@conn)
79
80
  end
80
81
 
82
+ def brand_categories
83
+ Resources::BrandCategories.new(@conn)
84
+ end
85
+
81
86
  private
82
87
 
83
88
  def build_connection
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tango
4
+ module Api
5
+ module Resources
6
+ # Resource for Brand Categories endpoints.
7
+ class BrandCategories < Base
8
+ # GET /brandCategories
9
+ def get
10
+ get_json("brandCategories")
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -15,6 +15,7 @@ module Tango
15
15
  def status: Resources::Status
16
16
  def exchange_rates: Resources::ExchangeRates
17
17
  def choice_products: Resources::ChoiceProducts
18
+ def brand_categories: Resources::BrandCategories
18
19
  end
19
20
  end
20
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tango-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puneeth Kumar DN
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-11-12 00:00:00.000000000 Z
11
+ date: 2025-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -76,6 +76,7 @@ extra_rdoc_files: []
76
76
  files:
77
77
  - ".rspec"
78
78
  - CHANGELOG.md
79
+ - CONTRIBUTING.md
79
80
  - LICENSE.txt
80
81
  - README.md
81
82
  - Rakefile
@@ -87,6 +88,7 @@ files:
87
88
  - lib/tango/api/errors.rb
88
89
  - lib/tango/api/resources/accounts.rb
89
90
  - lib/tango/api/resources/base.rb
91
+ - lib/tango/api/resources/brand_categories.rb
90
92
  - lib/tango/api/resources/catalogs.rb
91
93
  - lib/tango/api/resources/choice_products.rb
92
94
  - lib/tango/api/resources/customers.rb