duffel_api 0.3.0 → 0.4.0
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 +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +0 -3
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -3
- data/README.md +2 -3
- data/examples/book_and_change.rb +1 -1
- data/examples/book_with_extra_baggage.rb +1 -1
- data/examples/book_with_seat.rb +1 -1
- data/examples/exploring_data.rb +1 -1
- data/examples/hold_and_pay_later.rb +1 -1
- data/examples/search_and_book.rb +1 -1
- data/lib/duffel_api/client.rb +1 -1
- data/lib/duffel_api/resources/airline.rb +8 -0
- data/lib/duffel_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f0c68a903fdbb97b00475752aa584eb9e6b02958b86e01c1cac36868b3cbc9
|
4
|
+
data.tar.gz: 2c5758fe469ee2477a547ebf5ce22152a5c84c38cb6c56bdd4ed7ea27d9942d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cc6896e9c428495b803f798e4d398000e2100e90d428b10acabff186ee4086a7df2bee4e5d35dad08ed52d8091cff0fff7cac2cc465f2c9b67236e6b1e49c36
|
7
|
+
data.tar.gz: 46a28cd8797969b9161243a980457ab7b72942feaeb331f8c449dc7c8943a3de1a289326beda6bf6eab5113ff117ca36296f62e77cc340f37e61773cda128273
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -6,13 +6,13 @@ source "https://rubygems.org"
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
group :development, :test do
|
9
|
-
gem "gc_ruboconfig", "~> 3.
|
9
|
+
gem "gc_ruboconfig", "~> 3.4.0"
|
10
10
|
gem "pry", "~> 0.14.1"
|
11
11
|
gem "rake", "~> 13.0"
|
12
12
|
gem "rspec", "~> 3.11.0"
|
13
13
|
gem "rspec-its", "~> 1.3.0"
|
14
|
-
gem "rspec_junit_formatter", "~> 0.
|
15
|
-
gem "rubocop", "~> 1.
|
14
|
+
gem "rspec_junit_formatter", "~> 0.6.0"
|
15
|
+
gem "rubocop", "~> 1.36.0"
|
16
16
|
gem "rubocop-rake", "~> 0.6.0"
|
17
17
|
gem "simplecov", "~> 0.21.2"
|
18
18
|
gem "webmock", "~> 3.14.0"
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ A Ruby client library for the [Duffel API](https://duffel.com/docs/api).
|
|
20
20
|
In most cases, you'll want to add `duffel_api` to your project as a dependency by listing it in your `Gemfile`, and then running `bundle`:
|
21
21
|
|
22
22
|
```ruby
|
23
|
-
gem "duffel_api", "~> 0.
|
23
|
+
gem "duffel_api", "~> 0.4.0"
|
24
24
|
```
|
25
25
|
|
26
26
|
You can install `duffel_api` outside of the context of a project by running `gem install duffel_api` - for example if you want to play with the client library in `irb`.
|
@@ -118,7 +118,7 @@ client.offers.
|
|
118
118
|
|
119
119
|
A call to `#all` returns a Ruby [`Enumerator`](https://ruby-doc.org/core-2.6/Enumerator.html), which behaves a lot like an array - you can get the number of records with `#length`, loop through it with `#each`, etc.
|
120
120
|
|
121
|
-
If you prefer, you can also page through records manually using a service's `#list` method (e.g. `client.orders.list`) which returns a `DuffelAPI::ListResponse`.
|
121
|
+
If you prefer, you can also page through records manually using a service's `#list` method (e.g. `client.orders.list`) which returns a `DuffelAPI::ListResponse`.
|
122
122
|
|
123
123
|
The records in the page are returned by `#records` (`client.orders.list.records`) and the cursor for the next page (if there is one) can be found with `#after` (`client.orders.list.after`)
|
124
124
|
|
@@ -242,4 +242,3 @@ end
|
|
242
242
|
|
243
243
|
You can find complete documentation on this library's classes and methods in the in-code
|
244
244
|
documentation on [RubyDoc.info](https://rubydoc.info/github/duffelhq/duffel-api-ruby).
|
245
|
-
|
data/examples/book_and_change.rb
CHANGED
data/examples/book_with_seat.rb
CHANGED
data/examples/exploring_data.rb
CHANGED
data/examples/search_and_book.rb
CHANGED
data/lib/duffel_api/client.rb
CHANGED
@@ -4,7 +4,7 @@ module DuffelAPI
|
|
4
4
|
# A client for accessing the Duffel API, configured with a provided access token and
|
5
5
|
# base URL, which provides access to API services
|
6
6
|
class Client
|
7
|
-
API_VERSION = "
|
7
|
+
API_VERSION = "v1"
|
8
8
|
|
9
9
|
# Sets up the client with your access token
|
10
10
|
#
|
@@ -13,12 +13,20 @@ module DuffelAPI
|
|
13
13
|
# @return [String]
|
14
14
|
attr_reader :name
|
15
15
|
|
16
|
+
# @return [String, nil]
|
17
|
+
attr_reader :logo_lockup_url
|
18
|
+
|
19
|
+
# @return [String, nil]
|
20
|
+
attr_reader :logo_symbol_url
|
21
|
+
|
16
22
|
def initialize(object, response = nil)
|
17
23
|
@object = object
|
18
24
|
|
19
25
|
@iata_code = object["iata_code"]
|
20
26
|
@id = object["id"]
|
21
27
|
@name = object["name"]
|
28
|
+
@logo_lockup_url = object["logo_lockup_url"]
|
29
|
+
@logo_symbol_url = object["logo_symbol_url"]
|
22
30
|
|
23
31
|
super(object, response)
|
24
32
|
end
|
data/lib/duffel_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duffel_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Duffel team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base16
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.2.
|
161
|
+
rubygems_version: 3.2.3
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: A Ruby client for interacting with the Duffel API
|