easypost 4.8.1 → 4.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +5 -0
- data/.github/workflows/ci.yml +8 -0
- data/.gitignore +10 -14
- data/CHANGELOG.md +4 -0
- data/Makefile +10 -2
- data/README.md +5 -1
- data/VERSION +1 -1
- data/docs/EasyPost/Address.html +222 -0
- data/docs/EasyPost/ApiKey.html +99 -0
- data/docs/EasyPost/Batch.html +269 -0
- data/docs/EasyPost/Beta/EndShipper.html +225 -0
- data/docs/EasyPost/Beta/Referral.html +338 -0
- data/docs/EasyPost/Beta.html +91 -0
- data/docs/EasyPost/Billing.html +253 -0
- data/docs/EasyPost/Brand.html +140 -0
- data/docs/EasyPost/CarbonOffset.html +99 -0
- data/docs/EasyPost/CarrierAccount.html +136 -0
- data/docs/EasyPost/CarrierType.html +99 -0
- data/docs/EasyPost/CustomsInfo.html +136 -0
- data/docs/EasyPost/CustomsItem.html +136 -0
- data/docs/EasyPost/EasyPostObject.html +662 -0
- data/docs/EasyPost/EndShipper.html +175 -0
- data/docs/EasyPost/Error.html +258 -0
- data/docs/EasyPost/Event.html +136 -0
- data/docs/EasyPost/Insurance.html +99 -0
- data/docs/EasyPost/Order.html +222 -0
- data/docs/EasyPost/Parcel.html +136 -0
- data/docs/EasyPost/PaymentMethod.html +137 -0
- data/docs/EasyPost/Pickup.html +222 -0
- data/docs/EasyPost/PickupRate.html +99 -0
- data/docs/EasyPost/PostageLabel.html +99 -0
- data/docs/EasyPost/Rate.html +136 -0
- data/docs/EasyPost/Referral.html +334 -0
- data/docs/EasyPost/Refund.html +99 -0
- data/docs/EasyPost/Report.html +167 -0
- data/docs/EasyPost/Resource.html +399 -0
- data/docs/EasyPost/ScanForm.html +137 -0
- data/docs/EasyPost/Shipment.html +456 -0
- data/docs/EasyPost/TaxIdentifier.html +99 -0
- data/docs/EasyPost/Tracker.html +139 -0
- data/docs/EasyPost/User.html +307 -0
- data/docs/EasyPost/Util.html +462 -0
- data/docs/EasyPost/Webhook.html +221 -0
- data/docs/EasyPost.html +440 -0
- data/docs/created.rid +40 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +639 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +117 -0
- data/docs/js/darkfish.js +84 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +785 -0
- data/easypost.gemspec +3 -1
- data/lib/easypost/carrier_account.rb +17 -0
- data/lib/easypost/shipment.rb +1 -1
- data/lib/easypost/user.rb +5 -2
- data/lib/easypost/util.rb +2 -0
- metadata +115 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e86ea0929dfc06e0691b833ebb28f3f145bb3b648e0eb65c177289e47402971
|
4
|
+
data.tar.gz: 4defa28531159be78fa0201fa136626a74d30f80263c06507b31e2f8290a14e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eb2a6961275e7c5f8c38d46c059eec7d50d1593ac962f639db717b483685b2c25eddcf8582ff451d378917b73633e6e5a30a9e70d58f22a742ea80b65fab644
|
7
|
+
data.tar.gz: 13d85999dc9b63dbd7c1895dde7b09b6ce54e5e533ce1f0d738413d4de2d63e97de4e7f99eba9a0fcfbc68706c40b192c21f5cf31b0ea8681a834edb06947a65
|
data/.gitattributes
CHANGED
data/.github/workflows/ci.yml
CHANGED
@@ -19,11 +19,18 @@ jobs:
|
|
19
19
|
uses: ruby/setup-ruby@v1
|
20
20
|
with:
|
21
21
|
ruby-version: ${{ matrix.rubyversion }}
|
22
|
+
rubygems: "3.0.0"
|
22
23
|
bundler-cache: true
|
23
24
|
- name: Install Dependencies
|
24
25
|
run: make install
|
25
26
|
- name: run tests
|
26
27
|
run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make test
|
28
|
+
- name: Coveralls
|
29
|
+
if: github.ref == 'refs/heads/master'
|
30
|
+
uses: coverallsapp/github-action@master
|
31
|
+
with:
|
32
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
33
|
+
path-to-lcov: "./coverage/lcov/easypost-ruby.lcov"
|
27
34
|
lint:
|
28
35
|
runs-on: ubuntu-latest
|
29
36
|
steps:
|
@@ -33,6 +40,7 @@ jobs:
|
|
33
40
|
uses: ruby/setup-ruby@v1
|
34
41
|
with:
|
35
42
|
ruby-version: "3.1"
|
43
|
+
rubygems: "3.0.0"
|
36
44
|
bundler-cache: true
|
37
45
|
- name: Install Dependencies
|
38
46
|
run: make install
|
data/.gitignore
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
1
|
.bundle
|
4
2
|
.config
|
5
|
-
|
3
|
+
.idea/
|
4
|
+
*.gem
|
5
|
+
*.rbc
|
6
6
|
coverage
|
7
|
+
dist
|
8
|
+
Gemfile.lock
|
7
9
|
InstalledFiles
|
8
10
|
lib/bundler/man
|
9
11
|
pkg
|
@@ -12,21 +14,15 @@ spec/reports
|
|
12
14
|
test/tmp
|
13
15
|
test/version_tmp
|
14
16
|
tmp
|
15
|
-
.idea/
|
16
|
-
dist
|
17
17
|
|
18
|
-
# YARD artifacts
|
19
|
-
.yardoc
|
20
|
-
_yardoc
|
21
|
-
doc/
|
22
18
|
|
23
|
-
#
|
24
|
-
.
|
19
|
+
# macOS
|
20
|
+
._*
|
25
21
|
.AppleDouble
|
22
|
+
.DS_Store
|
23
|
+
.env
|
26
24
|
.LSOverride
|
27
|
-
Icon
|
28
|
-
._*
|
29
25
|
.Spotlight-V100
|
30
26
|
.Trashes
|
27
|
+
Icon
|
31
28
|
vendor/
|
32
|
-
.env
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v4.9.0 (2022-12-07)
|
4
|
+
|
5
|
+
- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the `create` function
|
6
|
+
|
3
7
|
## v4.8.1 (2022-10-24)
|
4
8
|
|
5
9
|
- Concatenates `error.message` if it incorrectly comes back from the API as an array
|
data/Makefile
CHANGED
@@ -12,6 +12,14 @@ build:
|
|
12
12
|
clean:
|
13
13
|
rm -rf coverage doc *.gem dist
|
14
14
|
|
15
|
+
## coverage - Generate a test coverage report
|
16
|
+
coverage:
|
17
|
+
make test
|
18
|
+
|
19
|
+
## docs - Generate documentation for the library
|
20
|
+
docs:
|
21
|
+
bundle exec rdoc lib -o docs --title "EasyPost Ruby Docs"
|
22
|
+
|
15
23
|
## fix - Fix Rubocop errors
|
16
24
|
fix:
|
17
25
|
bundle exec rubocop -A
|
@@ -41,11 +49,11 @@ scan:
|
|
41
49
|
|
42
50
|
## test - Test the project (and ignore warnings for test output)
|
43
51
|
test:
|
44
|
-
|
52
|
+
bundle exec rspec
|
45
53
|
|
46
54
|
## update - Updates dependencies
|
47
55
|
update:
|
48
56
|
git submodule init
|
49
57
|
git submodule update --remote
|
50
58
|
|
51
|
-
.PHONY: help build clean fix install lint publish release scan test update
|
59
|
+
.PHONY: help build clean coverage docs fix install lint publish release scan test update
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# EasyPost Ruby Client Library
|
2
2
|
|
3
3
|
[![Build Status](https://github.com/EasyPost/easypost-ruby/workflows/CI/badge.svg)](https://github.com/EasyPost/easypost-ruby/actions?query=workflow%3ACI)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/github/EasyPost/easypost-ruby/badge.svg?branch=master)](https://coveralls.io/github/EasyPost/easypost-ruby?branch=master)
|
4
5
|
[![Gem Version](https://badge.fury.io/rb/easypost.svg)](https://badge.fury.io/rb/easypost)
|
5
6
|
|
6
7
|
EasyPost, the simple shipping solution. You can sign up for an account at <https://easypost.com>.
|
@@ -130,6 +131,9 @@ EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make test
|
|
130
131
|
# Run security analysis
|
131
132
|
make scan
|
132
133
|
|
134
|
+
# Generate library documentation
|
135
|
+
make docs
|
136
|
+
|
133
137
|
# Update submodules
|
134
138
|
git submodule init
|
135
139
|
git submodule update --remote
|
@@ -137,7 +141,7 @@ git submodule update --remote
|
|
137
141
|
|
138
142
|
### Testing
|
139
143
|
|
140
|
-
The test suite in this project was specifically built to produce consistent results on every run, regardless of when they run or who is running them. This project uses [VCR](https://github.com/vcr/vcr) to record and replay HTTP requests and responses via "cassettes". When the suite is run, the HTTP requests and responses for each test function will be saved to a cassette if they do not exist already and replayed from this saved file if they do, which saves the need to make live API calls on every test run.
|
144
|
+
The test suite in this project was specifically built to produce consistent results on every run, regardless of when they run or who is running them. This project uses [VCR](https://github.com/vcr/vcr) to record and replay HTTP requests and responses via "cassettes". When the suite is run, the HTTP requests and responses for each test function will be saved to a cassette if they do not exist already and replayed from this saved file if they do, which saves the need to make live API calls on every test run. If you receive errors about a cassette expiring, delete and re-record the cassette to ensure the data is up-to-date.
|
141
145
|
|
142
146
|
**Sensitive Data:** We've made every attempt to include scrubbers for sensitive data when recording cassettes so that PII or sensitive info does not persist in version control; however, please ensure when recording or re-recording cassettes that prior to committing your changes, no PII or sensitive information gets persisted by inspecting the cassette.
|
143
147
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.9.0
|
@@ -0,0 +1,222 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class EasyPost::Address - EasyPost Ruby Docs</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link"><a href="Resource.html">EasyPost::Resource</a>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-c-create">::create</a>
|
76
|
+
<li ><a href="#method-c-create_and_verify">::create_and_verify</a>
|
77
|
+
<li ><a href="#method-i-verify">#verify</a>
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</nav>
|
83
|
+
|
84
|
+
<main role="main" aria-labelledby="class-EasyPost::Address">
|
85
|
+
<h1 id="class-EasyPost::Address" class="class">
|
86
|
+
class EasyPost::Address
|
87
|
+
</h1>
|
88
|
+
|
89
|
+
<section class="description">
|
90
|
+
|
91
|
+
<p><a href="Address.html"><code>Address</code></a> objects are used to represent people, places, and organizations in a number of contexts.</p>
|
92
|
+
|
93
|
+
</section>
|
94
|
+
|
95
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<section class="attribute-method-details" class="method-section">
|
100
|
+
<header>
|
101
|
+
<h3>Attributes</h3>
|
102
|
+
</header>
|
103
|
+
|
104
|
+
<div id="attribute-i-message" class="method-detail">
|
105
|
+
<div class="method-heading attribute-method-heading">
|
106
|
+
<span class="method-name">message</span><span
|
107
|
+
class="attribute-access-type">[RW]</span>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<div class="method-description">
|
111
|
+
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
</section>
|
115
|
+
|
116
|
+
|
117
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
118
|
+
<header>
|
119
|
+
<h3>Public Class Methods</h3>
|
120
|
+
</header>
|
121
|
+
|
122
|
+
<div id="method-c-create" class="method-detail ">
|
123
|
+
<div class="method-heading">
|
124
|
+
<span class="method-name">create</span><span
|
125
|
+
class="method-args">(params = {}, api_key = nil)</span>
|
126
|
+
<span class="method-click-advice">click to toggle source</span>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div class="method-description">
|
130
|
+
<p>Create an <a href="Address.html"><code>Address</code></a>.</p>
|
131
|
+
|
132
|
+
<div class="method-source-code" id="create-source">
|
133
|
+
<pre><span class="ruby-comment"># File lib/easypost/address.rb, line 8</span>
|
134
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">create</span>(<span class="ruby-identifier">params</span> = {}, <span class="ruby-identifier">api_key</span> = <span class="ruby-keyword">nil</span>)
|
135
|
+
<span class="ruby-identifier">address</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">_</span><span class="ruby-operator">|</span> [<span class="ruby-value">:verify</span>, <span class="ruby-value">:verify_strict</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">k</span>) }
|
136
|
+
|
137
|
+
<span class="ruby-identifier">wrapped_params</span> = { <span class="ruby-value">address:</span> <span class="ruby-identifier">address</span> }
|
138
|
+
|
139
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:verify</span>]
|
140
|
+
<span class="ruby-identifier">wrapped_params</span>[<span class="ruby-value">:verify</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-value">:verify</span>]
|
141
|
+
<span class="ruby-keyword">end</span>
|
142
|
+
|
143
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">:verify_strict</span>]
|
144
|
+
<span class="ruby-identifier">wrapped_params</span>[<span class="ruby-value">:verify_strict</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-value">:verify_strict</span>]
|
145
|
+
<span class="ruby-keyword">end</span>
|
146
|
+
|
147
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">EasyPost</span>.<span class="ruby-identifier">make_request</span>(<span class="ruby-value">:post</span>, <span class="ruby-identifier">url</span>, <span class="ruby-identifier">api_key</span>, <span class="ruby-identifier">wrapped_params</span>)
|
148
|
+
<span class="ruby-constant">EasyPost</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">convert_to_easypost_object</span>(<span class="ruby-identifier">response</span>, <span class="ruby-identifier">api_key</span>)
|
149
|
+
<span class="ruby-keyword">end</span></pre>
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div id="method-c-create_and_verify" class="method-detail ">
|
157
|
+
<div class="method-heading">
|
158
|
+
<span class="method-name">create_and_verify</span><span
|
159
|
+
class="method-args">(params = {}, api_key = nil)</span>
|
160
|
+
<span class="method-click-advice">click to toggle source</span>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="method-description">
|
164
|
+
<p>Create and verify an <a href="Address.html"><code>Address</code></a> in one call.</p>
|
165
|
+
|
166
|
+
<div class="method-source-code" id="create_and_verify-source">
|
167
|
+
<pre><span class="ruby-comment"># File lib/easypost/address.rb, line 26</span>
|
168
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">create_and_verify</span>(<span class="ruby-identifier">params</span> = {}, <span class="ruby-identifier">api_key</span> = <span class="ruby-keyword">nil</span>)
|
169
|
+
<span class="ruby-identifier">wrapped_params</span> = {}
|
170
|
+
<span class="ruby-identifier">wrapped_params</span>[<span class="ruby-identifier">class_name</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">params</span>
|
171
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">EasyPost</span>.<span class="ruby-identifier">make_request</span>(<span class="ruby-value">:post</span>, <span class="ruby-node">"#{url}/create_and_verify"</span>, <span class="ruby-identifier">api_key</span>, <span class="ruby-identifier">wrapped_params</span>)
|
172
|
+
|
173
|
+
<span class="ruby-constant">EasyPost</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">convert_to_easypost_object</span>(<span class="ruby-identifier">response</span>[<span class="ruby-string">'address'</span>], <span class="ruby-identifier">api_key</span>)
|
174
|
+
<span class="ruby-keyword">end</span></pre>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
</section>
|
182
|
+
|
183
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
184
|
+
<header>
|
185
|
+
<h3>Public Instance Methods</h3>
|
186
|
+
</header>
|
187
|
+
|
188
|
+
<div id="method-i-verify" class="method-detail ">
|
189
|
+
<div class="method-heading">
|
190
|
+
<span class="method-name">verify</span><span
|
191
|
+
class="method-args">()</span>
|
192
|
+
<span class="method-click-advice">click to toggle source</span>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
<div class="method-description">
|
196
|
+
<p>Verify an <a href="Address.html"><code>Address</code></a>.</p>
|
197
|
+
|
198
|
+
<div class="method-source-code" id="verify-source">
|
199
|
+
<pre><span class="ruby-comment"># File lib/easypost/address.rb, line 35</span>
|
200
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">verify</span>
|
201
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">EasyPost</span>.<span class="ruby-identifier">make_request</span>(<span class="ruby-value">:get</span>, <span class="ruby-node">"#{url}/verify"</span>, <span class="ruby-ivar">@api_key</span>)
|
202
|
+
|
203
|
+
<span class="ruby-constant">EasyPost</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">convert_to_easypost_object</span>(<span class="ruby-identifier">response</span>[<span class="ruby-string">'address'</span>], <span class="ruby-identifier">api_key</span>)
|
204
|
+
<span class="ruby-keyword">end</span></pre>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
</section>
|
212
|
+
|
213
|
+
</section>
|
214
|
+
</main>
|
215
|
+
|
216
|
+
|
217
|
+
<footer id="validator-badges" role="contentinfo">
|
218
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
219
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
|
220
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
221
|
+
</footer>
|
222
|
+
|
@@ -0,0 +1,99 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class EasyPost::ApiKey - EasyPost Ruby Docs</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link"><a href="Resource.html">EasyPost::Resource</a>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</div>
|
71
|
+
</nav>
|
72
|
+
|
73
|
+
<main role="main" aria-labelledby="class-EasyPost::ApiKey">
|
74
|
+
<h1 id="class-EasyPost::ApiKey" class="class">
|
75
|
+
class EasyPost::ApiKey
|
76
|
+
</h1>
|
77
|
+
|
78
|
+
<section class="description">
|
79
|
+
|
80
|
+
<p>An <a href="ApiKey.html"><code>ApiKey</code></a> allows you to authenticate with the <a href="../EasyPost.html"><code>EasyPost</code></a> API.</p>
|
81
|
+
|
82
|
+
</section>
|
83
|
+
|
84
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
</section>
|
91
|
+
</main>
|
92
|
+
|
93
|
+
|
94
|
+
<footer id="validator-badges" role="contentinfo">
|
95
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
|
97
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
|
+
</footer>
|
99
|
+
|