postmen 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/postmen/label.rb +2 -1
- data/lib/postmen/types.rb +11 -9
- data/lib/postmen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dcf572cb04e3a9659c5b849b41857a82c4869cb
|
4
|
+
data.tar.gz: fdea775c828c21e11ac77ba66fff02221dbd3b18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31e2b5546945a3e68f27669629fe4f4de1a99e30924acaf0ddffd55ac841abbc0b548a312e84413217f5600a6c39688b471f3d399e48e5dd7b30a67b514660ec
|
7
|
+
data.tar.gz: de98f2e8561a520d63f8cfb48f2f18e4645d2abd5aa137c167f6add3cd4e7e430d4dfac95cfb38223844f81f01d5f3a03874db39c1eb8d0b261e4ae73b92b004
|
data/lib/postmen/label.rb
CHANGED
@@ -8,7 +8,8 @@ class Postmen
|
|
8
8
|
attribute :tracking_numbers, Types::Array.member(Types::String)
|
9
9
|
attribute :files, Types::Strict::Nil | Types::Array.member(Types::Hash)
|
10
10
|
attribute :rate, Types::Strict::Nil | Types::Hash
|
11
|
-
|
11
|
+
attribute :created_at, Types::Strict::Nil | Types::DateTime
|
12
|
+
attribute :updated_at, Types::Strict::Nil | Types::DateTime
|
12
13
|
# Returns all labels
|
13
14
|
#
|
14
15
|
# @see LabelCollection#all
|
data/lib/postmen/types.rb
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
Dry::Types.load_extensions(:maybe)
|
3
3
|
|
4
4
|
class Postmen
|
5
|
+
|
6
|
+
PAPER_SIZES = [
|
7
|
+
'4x4',
|
8
|
+
'4x6',
|
9
|
+
'4x6.75',
|
10
|
+
'4x8',
|
11
|
+
'6x4',
|
12
|
+
'a4',
|
13
|
+
'default'
|
14
|
+
].freeze
|
5
15
|
# This module holds all definitions of simple types used in the API
|
6
16
|
module Types
|
7
17
|
include Dry::Types.module
|
@@ -59,15 +69,7 @@ class Postmen
|
|
59
69
|
Country = Types::String
|
60
70
|
|
61
71
|
# Paper size
|
62
|
-
PaperSize = Types::String.enum(
|
63
|
-
'4x4',
|
64
|
-
'4x6',
|
65
|
-
'4x6.75',
|
66
|
-
'4x8',
|
67
|
-
'6x4',
|
68
|
-
'a4',
|
69
|
-
'default'
|
70
|
-
)
|
72
|
+
PaperSize = Types::String.enum(PAPER_SIZES)
|
71
73
|
|
72
74
|
# Purpose used in customs object
|
73
75
|
#
|
data/lib/postmen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postmen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- postmen.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|